Skip to content

Instantly share code, notes, and snippets.

View ratankr39's full-sized avatar

Ratan Rapolu ratankr39

  • Sunnyvale, California, USA
View GitHub Profile
// Monk CheatSheet.
// Monk is a tiny layer that provides simple yet substantial usability improvements for MongoDB usage within Node.JS.
// https://github.com/LearnBoost/monk
// 1. Connecting to a single server or a replica-set and disconnecting.
// https://github.com/LearnBoost/monk#connecting
var db = require('monk')('localhost/mydb');
@ratankr39
ratankr39 / bash-cheatsheet.sh
Created November 29, 2015 17:54 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
@ratankr39
ratankr39 / .bash_prompt.sh
Created November 29, 2015 17:52 — forked from noisy/.bash_prompt.sh
.bash_prompt.sh (support for git + virtualenv)
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.