This file contains hidden or 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 | |
require 'pp' | |
require 'open-uri' | |
# the page that holds the registry (updated often) | |
registry = 'http://www.iana.org/assignments/language-subtag-registry' | |
culture_codes = Hash.new('') | |
current = "" |
This file contains hidden or 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 | |
require 'rubygems' | |
require 'sinatra' | |
require 'haml' | |
configure do | |
set :folder_name, 'pictures_of_me' | |
set :root, File.dirname(__FILE__) |
This file contains hidden or 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 | |
# http://en.wikipedia.org/wiki/Quadratic_alphabet_code | |
require 'pp' | |
class TapCode | |
attr_reader :letters, :array | |
def initialize |
This file contains hidden or 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
\documentclass[12pt]{amsart} | |
% this should add multiline comments | |
\usepackage{verbatim} | |
\usepackage{graphicx} | |
\begin{document} | |
\noindent | |
Dana Merrick \\ |
This file contains hidden or 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
// config variables | |
var port = 8090, | |
host = "localhost"; | |
// define the clues and answers | |
var clues = ['What is the most beautiful programming language?', | |
'That\'s right! What is the greatest city in the USA?', | |
'Perfect! Who makes the best online scavenger hunts?'], | |
answers = ['Ruby', |
This file contains hidden or 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 AddPasswordToOwner < ActiveRecord::Migration | |
def self.up | |
add_column :owners, :crypted_password, :string, :limit => 40 | |
add_column :owners, :salt, :string, :limit => 40 | |
end | |
def self.down | |
remove_column :owners, :crypted_password | |
remove_column :owners, :salt | |
end |
This file contains hidden or 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
# save this file as ~/.autotest | |
# start autospec with ./script/autospec | |
# you may need to install the "autotest" and "autotest-rails-pure" gems | |
# if you have any issues getting this to work (like Growl notifications not appearing), | |
# take a look at the README found here: http://github.com/svoop/autotest-growl | |
begin |
This file contains hidden or 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
# a mixin to provide logging and nagios monitoring to cron jobs | |
module Utils | |
module BCMCronJob | |
# set up the log file | |
# we could also simply use RAILS_DEFAULT_LOGGER | |
def before_job | |
log_file_name = "bcm_cron.log" | |
@log_file ||= File.open(File.join(Rails.root, 'log', log_file_name), 'a') | |
This file contains hidden or 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
------- Apache processes -------- | |
### Processes: 0 | |
### Total private dirty RSS: 0.00 MB | |
--------- Nginx processes ---------- | |
PID PPID VMSize Private Name | |
------------------------------------ |
This file contains hidden or 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 | |
# This script fills in some of the gaps on an Engine Yard cluster deploy. | |
# -Dana | |
# I could probably use ARGV for this, but whatever. | |
THIS_ENV=staging | |
# move into our home directory | |
cd |