Skip to content

Instantly share code, notes, and snippets.

Ian Young iangreenleaf

Block or report user

Report or block iangreenleaf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
iangreenleaf /
Last active Jan 8, 2019
Shotwell RAW metadata migrator - rescue your data from Shotwell
# Shotwell RAW metadata migrator
# This software is provided WITHOUT WARRANTY OF ANY KIND
# Shotwell doesn't write metadata to RAW files. This was a problem when I wished to migrate all my data out of Shotwell.
# This script pulls data out of Shotwell's database and writes it to the files using exiftool.
# This is not elegant, performant, or well-tested. However, it seems to get the job done!
iangreenleaf / Gemfile
Last active Jan 25, 2018
Usage example of the Bundler plugin I built for testing with JSON fixtures
View Gemfile
source "test/fixtures/my_rubygems_fixture", type: "json_fixture" do
gem "whatever"
gem "foobar", "~> 1.0.1"
iangreenleaf / npm-troubleshooter
Last active Apr 29, 2016
View npm-troubleshooter
# Guaranteed to fix any and every problem with your npm install!**
# © ️Ian Young 2016
# Usage:
# Simply run the script, passing as arguments the command that is failing.
# Come back in 1-45 minutes to a totally fixed npm install.
<ruleset name="">
<target host="" />
<target host="" />
<rule from="^http:" to="https:" />
View gist:897534a599ba652a5d3d
#= dump database to yaml for fixtures
# originated by elm200 <>
#== install
# move this file to RAILS_ROOT/lib/tasks/extract_fixtures.rake
namespace :db do
View gist:b206d09c587e8fc6399e

Rails naming conventions

General Ruby conventions

Class names are CamelCase.

Methods and variables are snake_case.

Methods with a ? suffix will return a boolean.

View gist:6dfb4d0847ebda0cc3dd
ack -f --print0 | xargs -0 -n1 vim +wq
iangreenleaf /
Created Jan 14, 2015
Keybase identity proof

Keybase proof

I hereby claim:

  • I am iangreenleaf on github.
  • I am iangreenleaf ( on keybase.
  • I have a public key whose fingerprint is 3820 459D 1ADA C0D3 6F33 988E 0D31 6FB4 774E 9147

To claim this, I am signing this object:

iangreenleaf / gist:984bc6765d2a4dc49862
Created May 12, 2014
Import seperate git repo as subdirectory
View gist:984bc6765d2a4dc49862
export target=my_dir
git remote add "$target" file:////path/to/original/repo
git fetch "$target"
git co -b "$target" "$target/master"
# Probably breaks on whitespace, sorry dawg.
git filter-branch -f --tree-filter "mkdir -p \"$target\"; git ls-tree \$GIT_COMMIT --name-only | xargs --no-run-if-empty mv -t $target" "$target"
git co master
git merge "$target"
git remote remove "$target"
git br -d "$target"
View wtf_handlebars
Here are the version numbers available for Handlebars.js
| npm versions | Official website | GitHub downloads | Git tags |
| 1.0.2beta | 1.0.0-rc.3 | 0.9.0.pre.2 | 0.9.0.pre.4 |
| 1.0.4beta | | 0.9.0.pre.3 | 1.0.0.beta.1 |
| 1.0.5beta | | 0.9.0.pre.4 | 1.0.0-rc.3 |
| 1.0.6 | | 0.9.0.pre.5 | 1.0.rc.1 |
| 1.0.6-2 | | 0.9.0.pre.js | 1.0.rc.2 |
You can’t perform that action at this time.