Skip to content

Instantly share code, notes, and snippets.

View khanghoang's full-sized avatar
😬

Khang Hoang khanghoang

😬
  • Dropbox
  • San Jose, CA
  • 16:44 (UTC -06:00)
  • X @khanght
View GitHub Profile
@khanghoang
khanghoang / mongodb-auth.txt
Created May 19, 2016 08:12 — forked from toan2406/mongodb-auth.txt
MongoDB authentication setting
docker run -v /datadir:/data/db --name mongo -d mongo --auth
docker exec -it mongo mongo
> use admin
> db.system.users.find()
> db.createUser({ user: 'admin', pwd: 'admin', roles: [ { role: "root", db: "admin" } ] });
> use some-db
> db.createUser({ user: 'user', pwd: 'user', roles: [ "readWrite" ] });
@khanghoang
khanghoang / tmux-cheatsheet.markdown
Created June 22, 2016 06:39 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@khanghoang
khanghoang / README.md
Created August 5, 2016 15:07 — forked from ryansch/README.md
neovim + yadr