Skip to content

Instantly share code, notes, and snippets.

View amerine's full-sized avatar
🌅
Out West

Mark Turner amerine

🌅
Out West
View GitHub Profile
@amerine
amerine / gist:1341224
Created November 5, 2011 07:14
polio cowboy
,,,,,,,,,,,,,;,,,,,,;,,,;,;,,;;,,;;,;,,;,;,,;;,;;;;;;,;;;,;,;;,,,,;,;,,,,,,,,,,,,,,,,
,,,,,,,;,3,,,,,;;,,;,;;;,;,;;,,;,,;,;;,;;;;;;,;;;,;,;,,,;,,;,,;,;,,,,,,,,,,,,,,,,,,,,
,,,;;,,;33,,,,,;;,,,,,,,;,;,,;;,;,,;;;;;;;;;;;;;;;,;;;;;,;,,;,,,,,,,,,,,,,,,,,,,,,,,,
,,,;;,,;33,,,;;;;,;,,,,,,,,,,,,,,,,,,,,,,,,;,,,,,,,,,,,,;,;,,,;;;,;,,,,;;,,,,,,,,,,,,
,,,,;,33f8oooo"""ooo,;,,,,,;,,;;;,;;,,,,;;,,,,,;,,,,,;,,,;,,;;;;,;;;,;,;;;;;;,,,,,,,,
,,,,,,;3f8oo;;o"o;;o,,,,,,,,,,,,,,ox8xxCC`CC8";,,,,,,,,,,,,,,,,,,,,,,;,,,,,;,,,,,,,,,
,,,,,,;,"fooo;;o;;;;,,,,,,,,,o"``AAA}AAAA````CCC",,,,,,,,,,,,,,,,,,,,;,,,,,,,,,,,,,,,
,,,,,,3;3foo;;;o;;;;,,,,,,,8`AAAAA`````````CCC8CCC;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
3;;;;3333"o;;"";o;;;,,,,,,oCC```````OC`O`````CC88CC;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,3,;,,;;;3;oooooo;;;,,,,,,,"CCCC`x`CCC8"CCC``CCCC88C,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
@amerine
amerine / gist:1265199
Created October 5, 2011 18:10 — forked from kalv/gist:913392
Clear out Resque messages that have Decode errors.
# Use from console, was required as old messages were incorrectly encoded and placed on the failed queue
# preventing us to view the failed queue.
include Resque::Helpers
Resque::Failure.count.times do |index|
puts "Checking #{index}"
begin
decode Resque.redis.lindex(:failed, index)
rescue Resque::Helpers::DecodeException
@amerine
amerine / rspec-syntax-cheat-sheet.rb
Created July 1, 2011 23:20 — forked from dnagir/rspec-syntax-cheat-sheet.rb
RSpec 2 syntax cheat sheet by example
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
@amerine
amerine / app.rb
Created February 22, 2011 07:25 — forked from densone/gist:838331
require 'rubygems'
require 'bundler'
Bundler.require(:default)
REST OF YOUR APP
; <<>> DiG 9.6.0-APPLE-P2 <<>> www.storquest.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20195
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0
;; QUESTION SECTION:
;www.storquest.com. IN A
; <<>> DiG 9.6.0-APPLE-P2 <<>> www.conservatoryseniorliving.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9688
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 0
;; QUESTION SECTION:
;www.conservatoryseniorliving.com. IN A
desc "Rebuild localhosts"
task(:rebuild_localhosts => :environment) do
ClientDomain.rebuild_localhosts
end
*.swp
.swo
*.scratch.*
log/*.log
log/searchd.*
tmp/**/*
db/*.db
db/*.sqlite3
.DS_Store
doc/api
*.swp
.swo
jferris-*.gemspec
*.scratch.*
log/*.log
log/searchd.*
tmp/**/*
db/*.db
db/*.sqlite3
.DS_Store
before do
if request.host != 'foo.com'
redirect 'http://foo.com'
end