Apple Pineapple

Some random PPAP comment from YouTube… (from Ryan Higa’s video actually… not even related to the video content lol)

 _
(•_•) 🖊
<)  )╯  i have a pen
/   \

      _
   (•_•)
🍎<(  (> I have an 
   /   \       apple

    _
  (•_•)
~ (   ) ~  uh!
  /    \

  _
(•_•)    🖊
<)  )- 🍎 apple pen
/   \

     _
  (•_•) 
 <(  (>🖊 i have a 
  /   \         pen

  _   🍍
(•_•)/
<)  ) i have pineapple 
/   \ 

    _ 
\(•_•) 
 (  (>  uh!
 /   \

  _        
(•_•) 🍍🖊
<)  )/ pineapple pen 
/   \ 

🍎🖊_  
\(•_•) 
 (  (>  apple pen
  /   \

  _  🍍🖊
(•_•)/
<)  ) pineapple pen 
/   \

    _ 
\(•_•) 
 (  (>  uh!
  /   \

🖊🍍🍎🖊
\(•_•)/
 ( . )   pen-pineapple-apple-pen
 /   \

 

Advertisements

Docker Notes

hub.docker.com

> docker version
> docker info

# Run a new container
> docker run hello-world

# See running and stopped containers 
> docker ps
> docker ps -a

> docker pull ubuntu # this pulls the latest version
> docker pull ubuntu:14.04
> docker rmi ubuntu:14.04

# Run image in interactive mode
# The following command enters to ubuntu (image) bash
> docker run -it --name temp ubuntu:latest /bin/bash 

# Don't type <code>exit</code> in the interactive shell because 
# it will kill the container as well

>> Ctrl P + Q # to exit interactive shell

# Stop all running instances
# -aq: a is all and q is quietly
> docker stop $(docker ps -aq) 

> docker rm $(docker ps -aq) 

> docker rmi $(docker images -q) 

 

The following images are screenshotted from Getting Started with Docker course on Pluralsight. It’s a great introductory course on Docker so check it out if you have a chance 😉

Economist – Taking off the training wheels

From Economist site. This short article basically states that 2017 was a good stable year financially; Let’s hope and pray that 2018 will continue and won’t burst the bubble.

sanguine: optimistic

secular stagnation: little or no economic growth in a market-based economy

cyclically: <= this is the hardest word to pronounce; it was something like sai-cli-cli

chary: discreetly careful

volatility: liability to change rapidly and unpredictably

Stop Text and Walk!

Everyone is busy. Life is short. We don’t want to waste more time traveling from one place to another.

To travel from my house to my workplace, I needed to take a bus then transfer to train. Not only does it cost a fortune for the shitty service, it also cost me ~3 hours per day of my life traversing.

To make the matter worse, my bus only comes every 20 minutes and it often got canceled (e.g. cancel due to traffic, cancel due to mechanical issues, etc. They give out every reason imaginable). That’s why even one single second matters. One short second can decide the destiny of my return bus trip be just 20 minutes or 40 fucking plus.

I always check the bus schedule while getting close to my train station. Thank god that they had this real-time lookup that is mostly accurate. This day, I saw that the bus was coming at 6:19pm and the train was stopping at my station at 6:18pm.

One minute.

“I can make it!” I told myself in my head.

There’s a long stair between the train and my bus stop, but I am a fast stair-down walker. I could do it in 10 sec. No problem.

Unfortunately noooo. There were two wide people in front of me. One was an old man holding onto the handrail while slowly walking down. The other was a mid-age dude texting on the phone, just wanted to block the way and took life slowly.

I tried my best to squeeze through, but no luck. The gap between the two was just fucked. I started to panic. I am going to miss my bus. I don’t want to wait until 6:43pm for the next one. I want to go home. I am tired from work. I have to go home now! That when I decided, I needed to take action.

Just. a. little. push.

“GET THE FUCK OUT OF MY WAY!!!” I pushed the texting dude off. 

Ahhhhhhhh!!! 

He screamed as I stood and watched him fell off the stairs. 

His phone flew off; he looked confused. I bet he was. He was probably texting his partner happily about dinner and all the sudden, found himself flying in mid-air. 

His body bumped up a few steps as he was going down. When he finally reached the bottom, his body was static. He was not moving. Blood started flowing. People started screaming.

I couldn’t care less and continued speeding down. I finally opened a way, I gotta catch my bus. I dashed lighting fast down the stairs, jumped over the turtle wide body, and made it just in time to catch my 6:19pm bus. 

 

That would be nice.

Unfortunately, the action I decided to take was no action. I let the people in front of me to keep walking slowly. I missed my bus at 6:19pm. The bus at 6:43pm, it didn’t come…

 

===============================

Please stop walking so slowly and blocking people’s way. You might accidentally kill a precious hour of people’s lives without knowing. If you must reply text urgently, please step aside to save the people behind you and save yourself from their imagination. Please and Peace.

 

Note:

If it isn’t obvious, the purple part is a work of fiction. I would really love to do that, but can’t do because I’m a coward… society won’t understand and won’t forgive me. Please don’t hurt the others. Let’s ship for Tweek x Craig.

[Lubuntu] Change Brightness

I’m using Lubuntu 14.04 and I found that you will have to make sure “Power Manager” is running for the brightness fn-keys to work.

To start Power Manager, go to Menu > Preferences > Power Manager

Once this is started, you should be able to adjust screen brightness with fn-keys.

Alternatively, you can read off my other post on autostart power manager so you can adjust your screen brightness without going through all the manual-clicking.

Cheers!!

SSH Key on Unbuntu

First generate the key from the terminal:

ssh-keygen

Then, copy the key from the following command:

cat ~/.ssh/id_rsa.pub

Finally, paste the key you have into the git service that you are using (I’m using bit bucket in this case). It should looks something like below:

Untitled

Ubuntu 14.04 – Change Apache DocumentRoot

This answer is taken from StackOverflow by the community wiki: http://stackoverflow.com/questions/5891802/how-do-i-change-the-root-directory-of-an-apache-server

Please note, that this only applies for Ubuntu 14.04 LTS and newer releases.

In my Ubuntu 14.04 LTS, the document root was set to /var/www/html. It was configured in the following file:

/etc/apache2/sites-available/000-default.conf

So just do a

sudo nano /etc/apache2/sites-available/000-default.conf

and change the following line to what you want:

DocumentRoot /var/www/html

Also do a

sudo nano /etc/apache2/apache2.conf

and find this

<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

and change /var/www/html to your preferred directory

and save it.

After you saved your changes, just restart the apache2 webserver and you’ll be done 🙂

sudo service apache2 restart

If you prefer a graphical text editor, you can just replace the sudo nano by a gksu gedit.