This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Connect to mongodb instance. | |
~~~ | |
mongod --port 27017 --dbpath /data/db | |
~~~ | |
2. Create user: | |
~~~ | |
use admin | |
db.createUser( | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout master | |
git pull | |
git checkout [branch] | |
git merge master | |
git commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma clang diagnostic push | |
#pragma clang diagnostic ignored "-Wdeprecated-declarations" | |
#pragma clang diagnostic pop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export JAVA_HOME=$(/usr/libexec/java_home) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo localedef -v -c -i en_US -f UTF-8 en_US.UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tutorials:Cracking the Code Interview | |
=========================== | |
- Arrays: Left Rotation | |
Algorithms:Warmup | |
================= | |
- Simple Array Sum | |
- Compare the Triplets | |
- A Very Big Sum | |
- Diagonal Difference |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl $(youtube-dl -g $1) | mplayer -cache 8192 - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if has('win32') || has('win64') | |
set runtimepath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/.vim/after | |
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" answer from http://stackoverflow.com/a/2159997/1406063 | |
" use 4 spaces for tabs | |
set tabstop=4 softtabstop=4 shiftwidth=4 | |
" display indentation guides | |
set list listchars=tab:❘-,trail:·,extends:»,precedes:«,nbsp:× | |
" convert spaces to tabs when reading file | |
autocmd! bufreadpost * set noexpandtab | retab! 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A Alpha | |
B Bravo | |
C Charlie | |
D Delta | |
E Echo | |
F Foxtrot | |
G Golf | |
H Hotel | |
I India | |
J Juliet |