Skip to content

Instantly share code, notes, and snippets.

View dragonfax's full-sized avatar

Jason Stillwell dragonfax

View GitHub Profile
@dragonfax
dragonfax / install perl.md
Last active December 20, 2015 15:18
How to install a user-specific perl on OSX.

Much like RVM installs rubies. Useful for updating perl or installing cpan modules without using sudo, or mucking up the system perl.

'homebrew' won't work for this. Instead, install 'perlbrew'.

$ curl -kL http://install.perlbrew.pl | bash

Put this in your ~/.bash_profile or ~/.bashrc

source ~/perl5/perlbrew/etc/bashrc

@dragonfax
dragonfax / TODO.md
Created August 29, 2013 01:36
Imported my todos from Toodledo to Asana.

README

Obviously I exported the tasks from Toodledo first into a csv file. So its not reading directly from Toodledo.

I mark all the new tasks with Toodledo project to track what source they came from.

TODO

@dragonfax
dragonfax / test.sh
Last active December 22, 2015 21:09
test yaml file syntax
ruby -ryaml -e 'YAML.load_file("filename")'
# or if you want to see the structured dumpoed out again.
ruby -ryaml -e 'puts YAML.load_file("filename")'
@dragonfax
dragonfax / parallelized_bundler.md
Created December 10, 2013 05:34
For those who love Zeus with their rails development. Try this.
$ gem install bundler --pre
$ bundle install -j20
javascript:(function() {
var bookmarklet = {
init: function() {
this.parse();
},
parse: function() {
page = "";
$(".PlaylistPage:visible")
.find(".Track")
.children(".info")
@dragonfax
dragonfax / gitstats.sh
Last active August 29, 2015 14:02
quick stats on commit ranking on a repo
echo -n "weeks ago,"
echo -n "number of commits,"
echo -n "rank,"
echo -n "total commiters"
echo
for i in {1..25}
do
rank_list=$(git shortlog -n -s --since "$i weeks ago" --until "$((i - 1)) weeks ago" | sed '/Jason Stillwell/q')
total_rank_list=$(git shortlog -n -s --since "$i weeks ago" --until "$((i - 1)) weeks ago")
@dragonfax
dragonfax / README.md
Last active August 29, 2015 14:03
reset mac hardware without reboot

This is useful, say, if your camera stops working. It forces the hardware to reboot without rebooting the OS. OSX doesn't provide a way to do this explicitely. In Windows its just called "Hibernate".

@dragonfax
dragonfax / README.md
Last active April 17, 2018 02:32
output readings from a Griffin PowerMate USB on osx

I was toying around with my PowerMate USB on the Mac.

I noticed that in the PowerMate application, you can set triggers for mouse wheel scrolling. But some applications coughMAMEcough don't pick it up.

Investigating I found that it provides its spinner as a uncommon HID type. So applications ignore it, not knowing how to handle that.

The click is presented as a normal button though. So no big deal there.

  1. brew install libusb
  2. brew install hidapi
@dragonfax
dragonfax / SDL testjoystick.log
Last active August 29, 2015 14:05
Enable PowerMate USB in SDL 1.2
Hershwild:SDL-1.2.15 jstillwell$ ./test/testjoystick 0
There are 2 joysticks attached
Joystick 0: Griffin PowerMate
axes: 1
balls: 0
hats: 0
buttons: 1
Joystick 1: PLAYSTATION(R)3 Controller
axes: 4
balls: 0
@dragonfax
dragonfax / README.md
Last active September 10, 2019 11:32
Add a "Checkbox" shortcut to Evernote Web Client

I recently switched from using the Evernote Desktop Client to the web client. The only thing I missed was the short-cut for creating Todo checkboxes.

Here is a quick TamperMonkey (Grease Monkey) script to add that functionality back in. Add the userscript to Tampermonkey.