Skip to content

Instantly share code, notes, and snippets.

View chandlervdw's full-sized avatar
:shipit:
cool guy doing cool stuff trying to be cool

Chandler Van De Water chandlervdw

:shipit:
cool guy doing cool stuff trying to be cool
View GitHub Profile
@Yimiprod
Yimiprod / difference.js
Last active July 4, 2024 13:14
Deep diff between two object, using lodash
/**
* This code is licensed under the terms of the MIT license
*
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {
// number to string, pluginized from http://stackoverflow.com/questions/5529934/javascript-numbers-to-words
window.num2str = function (num) {
return window.num2str.convert(num);
}
window.num2str.ones=['','one','two','three','four','five','six','seven','eight','nine'];
window.num2str.tens=['','','twenty','thirty','forty','fifty','sixty','seventy','eighty','ninety'];
window.num2str.teens=['ten','eleven','twelve','thirteen','fourteen','fifteen','sixteen','seventeen','eighteen','nineteen'];
@cbednarski
cbednarski / gist:4555141
Created January 17, 2013 10:37
Sublime Text keymap, which fixes the really annoying Ctrl+Tab order behavior
[
{ "keys": ["ctrl+shift+t"], "command": "open_terminal_project_folder" },
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }
]
@mason-stewart
mason-stewart / fancy-symbolset.scss
Created October 31, 2012 20:36
FANCY versions of Symbolset glyphs!
// This is a peek behind the curtain at @zaarly's epic-fantasy-heavy-metal-themed internal styleguide, better known as Hammer.
//
// With this, you can add the .fancy class to a symbolset span inside of a heading tag to add a nice circular background.
// Some adjustments to the positioning of a particular glyph may be necessary.
// Each :before is set to postion: relative, so fine-tuning a .fancy glyph is simple, and won't affect the position of the circle.
//
// Example markup (in HAML):
// %h1
// %span.ss-check.fancy
// Cool Guy Settings™ saved!
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@seangaffney
seangaffney / gist:1469551
Created December 12, 2011 22:59
Print functions bound to currently selected's click event
jQuery.each($($0).data("events").click, function(key, handlerObj) { console.log(handlerObj.handler) });
@seangaffney
seangaffney / .bash_alias
Created July 25, 2011 15:24
HAWTEST BASH PROFILE EVAR
alias lls='ls -lha'
alias ~='cd ~'
alias reload="source ~/.bash_profile"
alias pyserver="python -m SimpleHTTPServer"
# Projects
alias cdb1="cd ~/Sites/blah1"
alias cdb2="cd ~/Sites/blah2"