Sharing some random tidbits I learned throughout the week.
- To kill rogue rails process
- Find pid (process id) using
ps aux | grep railsorcat tmp/pids/server.pid kill -9 pid
- Find pid (process id) using
- Can restart nginx with
sudo service nginx restart - In Finder, press
Command-Upto go up a directory. - Monosnap is a neat screen recording tool to create gifs to add to your PRs.
- Flexbox is a sweet CSS3 layout mode.
- Can make content respond to available space, display in any direction.
- In Sass,
&references the parent selector.
#main {
color: black;
&-sidebar {
border: 1px solid;
}
}Compiles to:
#main {
color: black;
}
#main-sidebar {
border: 1px solid;
}- The
/etc/hostsfile is used by the operating system to map hostnames to IP addresses- The line
127.0.0.1 localhostmeans that your system will not do a DNS lookup forlocalhostand it will be redirected directed to the IP address127.0.0.1
- The line
- After installing a new gem using rbenv make sure to use
rbenv rehashto install the shims needed to make the gem’s commands executable. - The 401(K) plan is the American equivalent of the RRSP
- Set up with your employer and contributions come from payroll deductions.
- Questrade is a brokerage that is not owned by a bank.
- Cheap trades of $4.95 for stocks and free ETF trades.
- A Penny Stock is a stock that trades at a relatively low price.
- Highly speculative and risky stocks: Gamble
- Lack of liquidity: Tough to buy or sell without affecting price.
- Large bid-ask spreads
- The Penny Stock Fallacy is to think that many of today’s stocks were once penny stocks.
- Counter example: Microsoft was $21 and Wal-Mart was $16.50 on their first day of trading.
- Boiler Room Tactic is when a broker gives customers only positive information about a stock and discourages them from doing any outside research.
- High pressure selling by phone.
- Weekly Vim
- In insert mode,
CTRL-wandCTRL-ubackspace a word/line. Also works on the command line. - Can execute arbitrary command line commands with
:!{command}
- In insert mode,