Skip to content

Instantly share code, notes, and snippets.

View wahyudibo's full-sized avatar

Wahyudi Wibowo wahyudibo

  • Yogyakarta, Indonesia
View GitHub Profile
@wahyudibo
wahyudibo / jquery-chrome-console.js
Last active November 14, 2016 08:00
copy paste this code to your chrome console to give it jquery capabilities.
var script = document.createElement('script');script.src = "https://code.jquery.com/jquery-3.1.0.min.js";document.getElementsByTagName('head')[0].appendChild(script);
@wahyudibo
wahyudibo / mongodb cli.md
Last active November 14, 2016 08:01
I use this when following tutorial in https://scotch.io/tutorials/build-a-restful-api-using-node-and-express-4 to create mongo database on my project folder.
  1. cd /path/to/your/project
  2. mkdir data
  3. mongod --dbpath /path/to/your/project
  4. A bunch of text should appear, you will see "I NETWORK [initandlisten]" alot;
  5. type "mongo" and press enter
  6. MongoDB shell version: your-mongo-version connecting to: test should be appear in your console. If not, repeat from step 1
  7. Still in mongo console, type "use your-db-name"
  8. You should see "switched to db your-db-name"
  9. Now you can put 'mongodb://localhost/node_api' in your connection settings