This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Cache | |
attr_accessor :max_size | |
def initialize | |
@max_size = 99 | |
@cache = {} | |
end | |
def store(key,object) | |
@cache[key] = [0,object] | |
purge_old | |
key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?><Response><Play>http://izerion.com/da1392f0-460b-012f-74be-3c07544054a5.wav?asdf</Play></Response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias app_setup='br db:drop:all && br db:create:all && br dsi:schema:load && br db:schema:load && br db:seed' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BASEDIR=http://build.chromium.org/f/chromium/snapshots/Mac | |
mkdir -p /tmp/chromium_nightly | |
cd /tmp/chromium_nightly | |
echo "Downloading number of latest revision" | |
REVNUM=`curl -# $BASEDIR/LATEST` | |
echo "Found latest revision number $REVNUM, starting download" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -wKU | |
# Say you have one string of alphabetic characters, and say you have another, | |
# guaranteed smaller string of alphabetic characters. Algorithmically speaking, | |
# what's the fastest way to find out if all the characters in the smaller string are in the larger string? | |
# | |
# For example, if the two strings were: | |
# | |
# | |
# String 1: ABCDEFGHLMNOPQRS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'socket' | |
require 'openssl' | |
require 'net/ftp' | |
class Net::FTPS < Net::FTP | |
end | |
class Net::FTPS::Implicit < Net::FTP | |
FTP_PORT = 990 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Colors</key> | |
<dict> | |
<key>Background</key> | |
<string>0.097 0.101 0.124</string> | |
<key>InsertionPoint</key> | |
<string>1.000 1.000 1.000</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Example gemfile | |
source :gemcutter | |
# Rails 2.3.5 | |
gem 'rails', '~> 2.3.5', :require => nil | |
gem 'ruby-mysql', '>= 2.9.1', :require => 'mysql' | |
gem 'haml', '2.2.19', :require => nil | |
gem 'inherited_resources', '= 1.0.3' |
NewerOlder