Skip to content

Instantly share code, notes, and snippets.

View skarfacegc's full-sized avatar
💭
slowly working on Gue

Andrew Williams skarfacegc

💭
slowly working on Gue
View GitHub Profile
@skarfacegc
skarfacegc / keybase.md
Created April 16, 2014 19:59
My keybase.io verification file

Keybase proof

I hereby claim:

  • I am skarfacegc on github.
  • I am skarfacegc (https://keybase.io/skarfacegc) on keybase.
  • I have a public key whose fingerprint is 6A9A 1194 E747 D4A9 F7D9 158C 6876 333E 7FB8 DEA0

To claim this, I am signing this object:

@skarfacegc
skarfacegc / tmuxinator config
Last active August 29, 2015 14:22
tmuxinator config
#~/.tmuxinator/FlowTrack.yml
name: FlowTrack2
root: ~/Development/FlowTrack2
# Optional tmux socket
# socket_name: foo
# Runs before everything. Use it to start daemons etc.
# pre: sudo /etc/rc.d/mysqld start
@skarfacegc
skarfacegc / LoadModule.pm
Created June 5, 2015 14:48
Try to load specific version of a module
#
# Looks for moudules in ./lib with the name of Module-<version>.pl
# Loads the requested version when the module is 'use'ed
#
# Usage:
#
# use LoadModule MyModule => 'v1'
package LoadModule;
@skarfacegc
skarfacegc / doTween.pl
Created April 29, 2012 18:39
Handles tweening images when you've got too many to do at once
#!/opt/local/bin/perl
#
# Handles tweening via imagemagick
#
use Data::Dumper;
my @files = <*>;
my $work_queue = [];
my $i = 0;
my $k = 0;
@skarfacegc
skarfacegc / gist:2856422
Created June 2, 2012 03:38
imagemagick slugs
Curved Reflection (http://www.imagemagick.org/Usage/advanced/#reflections)
convert pokemon.gif -alpha on -virtual-pixel transparent \
\( +clone -flip -channel A -evaluate multiply .35 +channel \) -append \
+distort Barrel '0,0,0,1 0,0,-.35,1.5 32,32' \
-gravity North -crop 100x100+0-5\! \
-background black -compose Over -flatten reflect_3Darc.png
@skarfacegc
skarfacegc / gist:4161824
Created November 28, 2012 15:03
Copy perl modules
$ perlbrew switch 5.14.2
$ perl -MExtUtils::Installed -E 'say for ExtUtils::Installed->new->modules' > /tmp/installed.list
$ perlbrew switch perl-5.16.0
$ perlbrew install-cpanm
$ cat /tmp/installed.list | cpanm --interactive
@skarfacegc
skarfacegc / slate.conf
Last active December 10, 2015 01:58
Slate stuff
config defaultToCurrentScreen true
# Shows app icons and background apps, spreads icons in the same place.
config windowHintsShowIcons true
config windowHintsIconAlpha 0.5
config windowHintsIgnoreHiddenWindows false
config windowHintsSpread true
config secondsBetweenRepeat 0.1
# Development layout
@skarfacegc
skarfacegc / shell commands.sh
Last active December 15, 2015 06:09
Random useful shell commands
# list current network connections and refrsh every 2 seconds
watch "lsof -i -P |grep ESTABLISHED |awk '{printf \"%15.15s \\t%s\\n\", \$1, \$9}'"
# Show the number of commits per file
find . -type f -exec sh -c "echo {} ;git log --pretty=oneline {} |wc -l" \;
@skarfacegc
skarfacegc / tmux.conf
Last active December 17, 2015 03:29
my tmux.conf
# my tmux config file
# Emacs bindings
set -gw mode-keys emacs
# windows numbers start at 1
set -g base-index 1
# aliases
@skarfacegc
skarfacegc / promise.js
Created April 19, 2016 19:10
promise example from erik
function promised(fn) {
return function(cb) {
return new Promise(function(resolve, reject) {
fn(function { cb(); resolve() });
});
}
}
promised(myAsync)(myCallback).then(...);