class Ship
def load_cargo(name)
apply :cargo_loaded, :name => name
end
def paint(color)
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
# coding: utf-8 | |
require 'sinatra' | |
set server: 'thin', connections: [] | |
get '/' do | |
halt erb(:login) unless params[:user] | |
erb :chat, locals: { user: params[:user].gsub(/\W/, '') } | |
end | |
get '/stream', provides: 'text/event-stream' do |
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
"MARY","PATRICIA","LINDA","BARBARA","ELIZABETH","JENNIFER","MARIA","SUSAN","MARGARET","DOROTHY","LISA","NANCY","KAREN","BETTY","HELEN","SANDRA","DONNA","CAROL","RUTH","SHARON","MICHELLE","LAURA","SARAH","KIMBERLY","DEBORAH","JESSICA","SHIRLEY","CYNTHIA","ANGELA","MELISSA","BRENDA","AMY","ANNA","REBECCA","VIRGINIA","KATHLEEN","PAMELA","MARTHA","DEBRA","AMANDA","STEPHANIE","CAROLYN","CHRISTINE","MARIE","JANET","CATHERINE","FRANCES","ANN","JOYCE","DIANE","ALICE","JULIE","HEATHER","TERESA","DORIS","GLORIA","EVELYN","JEAN","CHERYL","MILDRED","KATHERINE","JOAN","ASHLEY","JUDITH","ROSE","JANICE","KELLY","NICOLE","JUDY","CHRISTINA","KATHY","THERESA","BEVERLY","DENISE","TAMMY","IRENE","JANE","LORI","RACHEL","MARILYN","ANDREA","KATHRYN","LOUISE","SARA","ANNE","JACQUELINE","WANDA","BONNIE","JULIA","RUBY","LOIS","TINA","PHYLLIS","NORMA","PAULA","DIANA","ANNIE","LILLIAN","EMILY","ROBIN","PEGGY","CRYSTAL","GLADYS","RITA","DAWN","CONNIE","FLORENCE","TRACY","EDNA","TIFFANY","CARMEN","ROSA","CINDY","GRACE","WENDY","VICTORIA", |
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 'mechanize' | |
require 'logger' | |
require 'date' | |
## Call: | |
## $ ruby export.rb <gmail> <password> | |
caFile = File.join(File.dirname(__FILE__), 'cacert.pem') | |
if not File.exists? caFile | |
require 'net/http' |
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 | |
git_bundles = [ | |
"git://github.com/msanders/snipmate.vim.git", | |
"git://github.com/scrooloose/nerdtree.git", | |
"git://github.com/timcharper/textile.vim.git", | |
"git://github.com/tpope/vim-cucumber.git", | |
#"git://github.com/tpope/vim-fugitive.git", | |
"git://github.com/tpope/vim-git.git", | |
"git://github.com/tpope/vim-haml.git", |
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
window['$'] = window['jquip'] = (function(){ | |
var win = window, | |
queryShimCdn = "http://cdnjs.cloudflare.com/ajax/libs/sizzle/1.4.4/sizzle.min.js", | |
queryEngines = function(){ return win["Sizzle"] || win["qwery"]; }, | |
doc = document, docEl = doc.documentElement, | |
scriptFns=[], load=[], sLoaded, | |
runtil = /Until$/, rmultiselector = /,/, | |
rparentsprev = /^(?:parents|prevUntil|prevAll)/, | |
rtagname = /<([\w:]+)/, | |
rclass = /[\n\t\r]/g, |
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
Unhandled Exception: System.TypeLoadException: Could not load type 'System.Runtime.Versioning.TargetFrameworkAttribute' from assembly 'NuGet'. | |
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type 'System.Runtime.Versioning.TargetFrameworkAttribute' from assembly 'NuGet'. | |
WARNING: The runtime version supported by this application is unavailable. | |
Using default runtime: v2.0.50727 | |
Missing method .ctor in assembly /Users/jstaten/bin/NuGet.exe, type System.Runtime.Versioning.TargetFrameworkAttribute | |
Can't find custom attr constructor image: /Users/jstaten/bin/NuGet.exe mtoken: 0x0a000746 |
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
WARNING: The runtime version supported by this application is unavailable. | |
Using default runtime: v2.0.50727 | |
Missing method .ctor in assembly /Users/jstaten/bin/NuGet.exe, type System.Runtime.Versioning.TargetFrameworkAttribute | |
Can't find custom attr constructor image: /Users/jstaten/bin/NuGet.exe mtoken: 0x0a000746 |
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
var allSockets = new List<IWebSocketConnection>(); | |
var server = new WebSocketServer("ws://localhost:8181"); | |
server.Start(socket => | |
{ | |
socket.OnOpen = () => | |
{ | |
allSockets.Add(socket); | |
}; | |
socket.OnClose = () => | |
{ |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer