Skip to content

Instantly share code, notes, and snippets.

@d-imal
d-imal / hack.sh
Created March 31, 2012 19:25 — 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
#
@d-imal
d-imal / gist:2644333
Created May 9, 2012 13:00
Git Blame Stats
git ls-tree -r HEAD|gsed -re 's/^.{53}//'|while read filename; do file "$filename"; done|grep -E ': .*text'|gsed -r -e 's/: .*//'|while read filename; do git blame "$filename"; done|gsed -r -e 's/.*\((.*)[0-9]{4}-[0-9]{2}-[0-9]{2} .*/\1/' -e 's/ +$//'|sort|uniq -c
@d-imal
d-imal / run-sketch.sh
Created May 14, 2019 03:41
Nicer way to run Processing sketches from the command line. Just pass the relative dir
#!/usr/bin/env sh
processing-java --sketch=`pwd`/$1 --run
@d-imal
d-imal / space-invaders.ts
Created March 17, 2024 21:47
Space Invaders
interface IPoint {
x: number;
y: number;
}
interface ISprite {
position: IPoint;
dimensions: {
width: number;
height: number;