Skip to content

Instantly share code, notes, and snippets.

@anonomis
anonomis / gist:8222381
Last active January 2, 2016 00:19
Invert colors
$.parseColor = (color) ->
cache = undefined
p = parseInt # Use p as a byte saving reference to parseInt
color = color.replace(/\s\s*/g, "") # Remove all spaces
#var
# Checks for 6 digit hex and converts string to integer
if cache = /^#([\da-fA-F]{2})([\da-fA-F]{2})([\da-fA-F]{2})/.exec(color)
cache = [p(cache[1], 16), p(cache[2], 16), p(cache[3], 16)]
@anonomis
anonomis / gitpulldirs.sh
Created May 9, 2011 14:05
git pull all directories from a parent directory
#!/bin/bash
for A in *;
do
if [ -d $A ];
then cd $A;
git pull;
cd ..;
fi;
done;
We couldn’t find that file to show.