Skip to content

Instantly share code, notes, and snippets.

@udayms
udayms / git-log-pretty
Created June 7, 2017 18:25 — forked from miebach/git-log-pretty
pretty git log graph with coloured branches
# Visualizing branch topology in git on the commandline
git log --graph --oneline --full-history --all
git log --graph --full-history --all --pretty=format:"%h%x09%d%x20%s"
# With colors in Bash:
git log --graph --full-history --all --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"
Verifying I am +udayms on my passcard. https://onename.com/udayms
@udayms
udayms / Team.json.postman_collection
Created April 7, 2015 18:44
ElasticSearch - Postman Collection to create an Index and insert ~10k records into it.
This file has been truncated, but you can view the full file.
{
"id": "124e573f-bc1b-4d9a-a7ec-c4c17f2095e1",
"name": "Team",
"description": "",
"order": [
"0fa78cfe-0d72-19c6-3ac7-b299a3e95540",
"57194727-54b8-caa3-bb58-c78f0cfcb32f",
"c36dccba-09af-3b85-f3d0-b3bfb925dd59",
"34bea456-2f76-d5ea-f39a-0305ed2bab4e",
"4b5a2548-c9ab-73bb-13d5-e35d256a4e19",
@udayms
udayms / angular-directives.js
Last active December 14, 2015 16:39
An AngularJS directive that loads json files from the list of files supplied in the html element and stores the data in $rootScope.db. It also fires an event databank-ready that can be listened to from the controller. Thanks to Clint Checketts for helping me debug this.
app.directive('databank', ['$parse','$http', '$rootScope', function($parse, $http, $rootScope) {
return {
restrict: 'E',
replace: true,
scope: { accept: "=",fn:"=onReady" },
link: function(scope, elem, attr){
var files = attr.files.split(' ');
var promises = {};
var db = {};
@udayms
udayms / hammer-directives.js (ported for Hammer v2)
Last active December 14, 2015 03:49 — forked from phindmarsh/directives.js
Ported for Hammer v2 events. The v2 version of Hammer can be found at https://github.com/EightMedia/hammer.js/tree/v2. Demos at http://eightmedia.github.com/hammer.js/v2/
/**
* Inspired by AngularJS' implementation of "click dblclick mousedown..."
*
* This ties in the Hammer v2 events to attributes like:
* The v2 version of Hammer can be found at https://github.com/EightMedia/hammer.js/tree/v2
*
* hm-tap="add_something()"
* hm-swipe="remove_something()"
*
* and also has support for Hammer options with: