Skip to content

Instantly share code, notes, and snippets.

View ambethia's full-sized avatar
🐼
PANDAS!

Jason L Perry ambethia

🐼
PANDAS!
View GitHub Profile
@ambethia
ambethia / _index.md
Created October 18, 2008 01:28
All kinda of deployment notes
@ambethia
ambethia / Vendor Trash
Created November 15, 2008 04:39
Vendor Priority
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
Ranged
Plate Chest/Legs
Sheild
@ambethia
ambethia / Clean Branch
Created January 20, 2009 23:42
Removing the history from a new 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
ambethia / mount.rb
Created March 9, 2009 18:50
Trying to make myself feel better about how many times I've killed Anzu now.
require "rubygems"
require "gruff"
graph = Gruff::Line.new
graph.title = "Drop the damn mount already..."
graph.data("%", (1..800).map { |y| (1 - (0.99 ** y)) * 100 })
graph.labels = {0 => "1", 50 => "50", 100 => "100", 250 => "250", 500 => "500", 750 => "750+"}
@ambethia
ambethia / Replacing forked repo's master branch with my own
Created June 30, 2009 14:41
Replacing forked repo's master branch with my own
git clone git@github.com:user_a/repo.git
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
ambethia / install-ruby.sh
Created July 30, 2009 03:13
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 ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.9.1-p243.tar.gz
tar xzvf ruby-1.9.1-p243.tar.gz
cd ruby-1.9.1-p243/
autoconf
./configure --program-suffix=19 --enable-shared --with-readline-dir=/usr/local --enable-pthread CFLAGS=-D_XOPEN_SOURCE=1
make && sudo make install
=begin
host_ip_info.rb (http://gist.github.com/169374)
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
# requires "isightcapture" in the cwd (http://www.intergalactic.de/pages/iSight.html)
INTERVAL = 20
@t1 = Time.now - INTERVAL
while true
@t2 = Time.now
if @t2 - @t1 >= INTERVAL
@t1 = @t2
@ambethia
ambethia / README
Created September 2, 2009 16:34
css2sass, but in the browser. Perfect for copy/pasting little snippets.
Try it like:
> curl http://gist.github.com/raw/179812/b4c828dec41437839dec8a74b2aff03227145ce2/sassy.rb | ruby
Actually... damn that doesn't work. :( I'll figure it out later.
@ambethia
ambethia / hello.rb
Created September 3, 2009 23:17
A contrived example of a problem I'm have testing sessions in Sinatra with Rack::Test
require 'sinatra/base'
class HelloApp < Sinatra::Base
enable :sessions
get '/' do
"Hello, #{session[:user]}"
end
post '/' do