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 😉

Advertisements

How to be a better narrator

I was looking more into how to becoming a better article narrator, but no one seems to be focusing on that. Audiobook narration skills might just well be applicable to context so let’s take a look.

Vocal Attributes

  1. Quality
    • Clarity and control
    • Fabulous voice is nice, but interesting voice is better
    • Be aware of breathing patterns or other vocal noises such as gulping, swallowing
    • Do not end sentences with downward or upward tone all the time
  2. Strength
    • Must be loud enough for the mic to capture the voice including whispering
  3. Stamina
    • Show no audible tiring or any degradation
    • Speak for 30 minutes without dry throat or hurting the throat

Be an Active Listener

  • Listen to audiobook narration and note what you like and dislike. Do the likes and try to avoid the dislikes
  • Listen to your own recording to note down which are good and bad

⭐ Starting the Recording ⭐

  1. Mumble and murmur through the article first; highlight unrecognized words
  2. On the article, research and note down the pronunciation of those unfamiliar words. Don’t guess
  3. Set up the recording environment
    • Sit straight
    • Position your articles to your eye level and look straight (don’t look down to press your voice)
    • Start the mic
  4. Bonus for non-fiction: try to narrate with a smile even if the article is shitty. 🙂 Listen for your tone change

Breathing Exercise

  1. Inhale => Count to 10, 15, 20
  2. Inhale => Ahhhhh~~~ (say ah and aim for 18 seconds)

Train the articulate muscles (mouth and tongue)

I don’t recommend doing it in front of a mirror and in an environment that has living human being walking around. But, you can do whatever you want xD

  • Blow your mouth
  • Move your tongue across the gum touch every the tooth from upper right to lower
  • Grim and soop (amazon smile and :x)
  • Channel tongue: wide it and thin it
  • Yawn: right side, left side, both sides
  • La Le Li Lo Lu
  • Talk with tongue sticking out of the mouth

 

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

Short-circuit the Fear of Rejection

This is post is a note of Charlie’s video on How To Short-Circuit The Fear Of Rejection. Definitely check his video out if you have the luxury of time.

⭐ Disassociate the rejection ⭐

Find out why you are being rejected. Maybe it’s a skill set that you are currently missing from your workplace for example. Figure it out, learn it and master it! Don’t let that reason be the reason forever.

Broaden your perspective

Don’t focus too much on a particular rejection. For example, we might think that if I don’t get an offer from this Company A, I will be ruined. However, it was never about that Company A. The goal might be to find a job that motivates you every single day, which means, there are Company B and Cs and so forth.

It’s important that you take time to analyze why you weren’t accepted though. Go back to the previous point to disassociate the rejection first, so you won’t make the same mistake in next company or even when you reapply. If you failed this time, it doesn’t mean that you will fail the next one. (;

Success often comes with Luck

This one should be obvious. Maybe the person that you are confronting just wasn’t in the mood or had a bad day that is outside of your control. Hence, be prepared and improve your skillset again to get a higher probability of success.

Stop thinking the negatives

Don’t even think “I will be rejected” in any form in the mind because it will show that you feel/are unworthy of the current state. Instead, just think or say aloud “I got accepted!” even though you might not have been accepted yet. I realized that if I think and act as if I’ve already been accepted, I am more relaxed and less tense in the situation. Both parties will feel more comfortable.

 

Display a list of posts in WordPress.com

To embed a list of posts in WordPress.com, display-posts shortcode is the way to generate this list. While WordPress.com already have a great documentation for this shortcode, I am going to highlight some extremely useful ones and add some notes to them:

author
[display-posts author="your_username"]
This display a list of posts published by given author.
Note: the author attribute is taking username, not the display name

category
[display-posts category="category_name"]
Display a list of posts belong to certain category(s)
Note:
The category name is not case-sensitive, so if you have a category name such as Admin's Log, then category="admin's log" or category="ADMIN'S LoG" works fine too. Notice it accepts special character as well 😉

tag
[display-posts tag="tag_name"]
Display a list posts belong to certain tag(s)
If you want a list with mutiple tag, just add a comma in between: tag = "tag1, tag2"

include_excerpt
[display-posts include_excerpt="true"]
Display a list of your posts with a short excerpt

include_date
[display-posts include_date="true"]
Display a list of your post name with date => (month/day/year)

wrapper
[display-posts wrapper="ol"]
Display the list in ordered list
Note: 3 options: uloldiv. => default is ul

posts_per_page
[display-posts posts_per_page="20"]
Display a list of posts with 20 items. If this attribute is not specified, the default value is 10
Note:
-1 means display all posts; having that said, display-posts has a limit of 100 items, so the following attribute will help

offset
[display-posts offset="20"]
Display a list of posts starting on the 20th item

 

 

And of course, you can join these attributes together and have something like:

[display-posts category="category_name" tag="tag_name" posts_per_page="3" include_excerpt="true" include_date="true"]

And I would get:

  • Hide directory tree in Apache server (3/1/2015) - Take me hours to figure this crap out. Anyways, here’s the short story:   Open apache configuration file: sudo nano /etc/apache2/apache2.conf   Scroll down to the <Directory /var/www/>. Add Options -Index and comment Option Indexes FollowSymLinks like so: <Directory /var/www/> Options -Indexes # Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>   That’s all … Continue reading
  • Server Setup on Instances (3/1/2015) - Install Apache sudo apt-get install apache2-mpm-prefork sudo a2enmod userdir sudo a2enmod expires Restart Apache sudo /etc/init.d/apache2 restart sudo service apache2 restart Install MySQL sudo apt-get install mysql-server mysql-client Create DB user in MySQL CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; CREATE DATABASE db_name; GRANT ALL ON db_name.* TO 'username'@'localhost'; Install PHP sudo apt-get install php5 libapache2-mod-php5 … Continue reading
  • Linux Commands (10/23/2014) - Remove directory and all the files/folders in it: rm -rf <folder_name> Copy a directory and all its contents: cp -a /source/. /dest/ Git commands Stage only modified files and not untracked ones git add -u Commit git commit -m 'your_message'

 

To find out more about this shortcode: https://en.support.wordpress.com/display-posts-shortcode/

Have fun with WordPress.com!!

McDonald’s Squirtle

I got this happy meal squirtle a few days ago. Apparently, McDonald is bringing back Pokemon theme again. I am old, but so what? I still like toys.

Basically, you get a pokemon figure, a battle card, a collection-set info paper, and a circle squritle info card in the package. I thought the circle card was a sticker, but it wasn’t 😦

 

It actually squirts out water though. There is a button on the back of the shell that lets the turtle absorb and spit water out of its mouth at the front.

 

Also if we take a closer look at the text on the back of its head, this thing was made back in 2016.

 

I can’t help but think that this is a returned toy from somewhere else because there are a few black dots on some parts of its body. On top of that, this Squirtle figure does seem a little bit aged. Well, I guess it can’t be helped though since Happy Meal also contains the food portion (i.e., small fries, a burger with just buns and ketchup, a tiny cup of apple juice, and a bar of yogurt) for that $4.33. What can I say… ¯\_(ツ)_/¯

Bitcoin Notes

I went to a super awesome bitcoin meetup event today. It was an introductory presentation which was perfect for a noobie like me. Anyways, here’s a short note:

  • Bitcoin was introduced by Satoshi in 2008 when market crashed
  • The purpose is to create a cash flow system that cannot be controlled by banks, government, or anyone!
  • All transactions are transparent on the blockchain
  • Wallet address
  • You cannot reverse a transaction and double confirm the account number
    • no revert even for switching between wallets
    • If you send bitcoin to account that doesn’t exist, that amount of bitcoin is lost forever!!
  • Nobody can force you to pay without your permission first
    • e.g. if you didn’t pay your tax, the government can deduct money from your bank account without your permission. This act is strictly prohibited in bitcoin world

Where to spend and buy bitcoin?

  • Bitcoin can now be used on Telsa, Virgin, Microsoft, Amazon, etc. It can also be used to purchase real estate in certain areas of U.S.
  • Bitcoin can be purchased in any amount, not necessarily a whole coin.
    • coinme.com
    • gemini.com
    • AVOID coinbase.com (should be avoided because it’s closely related to IRS and is not fully transparent with everything)
    • Bitcoin ATM: 5~10% rate

Crypto-wallets

  • blockchain (works on mobile as well as web)
  • mycelium (only works on mobile)

Three ways to earn $ on bitcoin

  1. Buy and Hold: earn appreciation
  2. Buy and Trade:  buy low sell high on other cryptocurrencies such as ripple or litecoin
  3. Buy & Compound: USI tech – BTC package
    • 1 package = USD$60

Bonus vocabulary:

  • fork: any event that causes bitcoin to dip/decrease in value