Skip to content

Instantly share code, notes, and snippets.

View mailtoharshit's full-sized avatar
๐Ÿค”
Always Curious

Harshit Pandey mailtoharshit

๐Ÿค”
Always Curious
View GitHub Profile
@mailtoharshit
mailtoharshit / app.js
Created September 28, 2016 06:55 — forked from pixelhandler/app.js
Develop a RESTful API Using Node.js With Express and Mongoose - See: http://pixelhandler.com/blog/2012/02/09/develop-a-restful-api-using-node-js-with-express-and-mongoose/
var application_root = __dirname,
express = require("express"),
path = require("path"),
mongoose = require('mongoose');
var app = express.createServer();
// database
mongoose.connect('mongodb://localhost/ecomm_database');
@mailtoharshit
mailtoharshit / Dynamic injection with JQuery.js
Last active January 31, 2016 02:17 — forked from ThomasBurleson/ScriptInjection.js
Script injection with Deferred/Promises (non-jQuery)
/**
* Module that defers loading of external script until page/jQuery is ready.
*
* This sample uses jQuery to load/inject the script... and supports chaining
* or post load actions.
*
*/
// When the page/DOM is ready... (or any time)
// Callback handler to be invoked when the page/DOM is ready
@mailtoharshit
mailtoharshit / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console