Skip to content

Instantly share code, notes, and snippets.


Jason L Perry ambethia

View GitHub Profile
ambethia /
Created Oct 18, 2008
All kinda of deployment notes
View Vendor Trash
Sorted by sell value, low to high. Not always
accurate, but this seems to be the general pattern.
Item classes on the same line generally have
the same value.
2H Weapons
1H Weapons
Plate Chest/Legs
ambethia / Clean Branch
Created Jan 20, 2009
Removing the history from a new branch
View Clean Branch
git symbolic-ref HEAD refs/heads/newbranch
rm .git/index
git clean -fdx
<do work>
git add your files
git commit -m 'Initial commit'
ambethia / mount.rb
Created Mar 9, 2009
Trying to make myself feel better about how many times I've killed Anzu now.
View mount.rb
require "rubygems"
require "gruff"
graph =
graph.title = "Drop the damn mount already...""%", (1..800).map { |y| (1 - (0.99 ** y)) * 100 })
graph.labels = {0 => "1", 50 => "50", 100 => "100", 250 => "250", 500 => "500", 750 => "750+"}
ambethia / Replacing forked repo's master branch with my own
Created Jun 30, 2009
Replacing forked repo's master branch with my own
View Replacing forked repo's master branch with my own
git clone
cd repo
git branch -m master old-master
git symbolic-ref HEAD refs/heads/new-master
rm .git/index
git clean -fdx
# add a remote for user_b's repo, call it, say, user_b
git pull user_b master:new-master
git branch -m new-master master
git push origin master
ambethia /
Created Jul 30, 2009
Notes on using ruby 1.9 and 1.8 side by side (tested on OS X 10.5 and 10.6), plus a small script to toggle between 1.9 and 1.8 ruby installations
mkdir -p ~/src
SetFile -a "V" ~/src
cd ~/src
curl -O
tar xzvf ruby-1.9.1-p243.tar.gz
cd ruby-1.9.1-p243/
./configure --program-suffix=19 --enable-shared --with-readline-dir=/usr/local --enable-pthread CFLAGS=-D_XOPEN_SOURCE=1
make && sudo make install
View host_ip_info.rb
host_ip_info.rb (
Copyright (c) 2009 Jason L Perry
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
View time_lapse.rb
# requires "isightcapture" in the cwd (
@t1 = - INTERVAL
while true
@t2 =
if @t2 - @t1 >= INTERVAL
@t1 = @t2
ambethia / README
Created Sep 2, 2009
css2sass, but in the browser. Perfect for copy/pasting little snippets.
Try it like:
> curl | ruby
Actually... damn that doesn't work. :( I'll figure it out later.
ambethia / hello.rb
Created Sep 3, 2009
A contrived example of a problem I'm have testing sessions in Sinatra with Rack::Test
View hello.rb
require 'sinatra/base'
class HelloApp < Sinatra::Base
enable :sessions
get '/' do
"Hello, #{session[:user]}"
post '/' do