Skip to content

Instantly share code, notes, and snippets.

🐼
PANDAS!

Jason L Perry ambethia

🐼
PANDAS!
View GitHub Profile
@ambethia
ambethia / _index.md
Created Oct 18, 2008
All kinda of deployment notes
View _index.md
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
Ranged
Plate Chest/Legs
Sheild
@ambethia
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
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 = 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 Jun 30, 2009
Replacing forked repo's master branch with my own
View 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 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
View install-ruby.sh
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
View host_ip_info.rb
=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
View time_lapse.rb
# 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 Sep 2, 2009
css2sass, but in the browser. Perfect for copy/pasting little snippets.
View README
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 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]}"
end
post '/' do
You can’t perform that action at this time.