Skip to content

Instantly share code, notes, and snippets.

View cggaurav's full-sized avatar
Working from home

Gaurav cggaurav

Working from home
View GitHub Profile
cggaurav / index.html
Created March 21, 2012 15:07 — forked from mbostock/
Interactive Tree (D3)
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Node-Link Tree</title>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<style type="text/css">
circle.node {
cggaurav / README.markdown
Created September 9, 2012 04:01 — forked from gudbergur/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string
* Based on from
* Neither that gist nor this one work for me in 0.2.x or 0.3.x.
var request = require('request'),
BufferList = require('bufferlist').BufferList,
sys = require('sys'),
bl = new BufferList(),
url = ''
app = angular.module 'BlogExample', []
# Simple controller that loads all blog posts
app.controller 'BlogCtrl', ['$scope', 'Blog', ($scope, Blog) ->
# Get all the blog posts
Blog.all().then (posts) ->
$scope.posts = posts
# Extend the $scope with our own properties, all in one big block
# I like this because it looks like declaring a class.
# Name:
# Author: Brian Klug (@nerdtalker /
# Purpose:
# Move Files into directory based on EXIF data make and model
# Designed to un-clusterfuck the Dropbox camera upload directory which is a mess of every
# JPEG and PNG ever if you use it like I do on a bunch of phones, and thus totally unwieldy
# and full of images sorted by date or else nothing sometimes, dropbox seems nondeterminstic
# Moves files into /[Image Make]+[Image Model]/ eg /Camera Uploads/LGE Nexus 4/
# Initialize the stuff
# We build the status bar item menu
framework 'AppKit'
def setupMenu
menu =
menu.initWithTitle 'Flipsicle'
mi =
$ wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains \
--no-parent \
cggaurav /
Created May 18, 2017 23:45 — forked from joepie91/
The Promises FAQ - addressing the most common questions and misconceptions about Promises.
cggaurav / cloudapp-export.rb
Last active October 9, 2017 00:10 — forked from adamcooke/cloudapp-export.rb
Export all your drops from CloudApp using this quick Ruby script
#!/usr/bin/env ruby
# A quick script to download all your files from CloudApp.
# To run this just run the script passing your e-mail & password
# to the script, for example:
# gem install cloudapp_api
# ruby cloudapp-export.rb mypassword
cggaurav / streams-test.js
Created June 18, 2018 20:06 — forked from grimen/streams-test.js
Experiments with Node.js Stream API.
/* =============================================
------------------------------------------ */
const debug = require('debug')
const { Readable, Writable, Transform } = require('stream')
const JSONStream = require('JSONStream')