Skip to content

Instantly share code, notes, and snippets.

View natebird's full-sized avatar
🌐
Working online

Nate Bird natebird

🌐
Working online
View GitHub Profile
@natebird
natebird / keybase.md
Created March 17, 2014 18:48
keybase identity proof

Keybase proof

I hereby claim:

  • I am natebird on github.
  • I am natebird (https://keybase.io/natebird) on keybase.
  • I have a public key whose fingerprint is 3134 7710 4658 445B 62AC D7CF 5A09 49BD 44FE 9C23

To claim this, I am signing this object:

Verifying that +natesbird is my openname (Bitcoin username). https://onename.io/natesbird
@natebird
natebird / Slicehost capistrano recipe
Created December 20, 2008 21:12
multi stage production recipe for slicehost
#############################################################
# Application
#############################################################
set :application, "app_name"
set :deploy_to, "/home/user/public_html/#{application}"
#############################################################
# Settings
#############################################################
<!--[if lte IE 7]>
<style type="text/css">
#ie6msg{border:3px solid #090; margin:8px 0; background:#cfc; color:#000;}
#ie6msg h4{margin:8px; padding:0;}
#ie6msg p{margin:8px; padding:0;}
#ie6msg p a.getie8{font-weight:bold; color:#006;}
#ie6msg p a.ie6expl{font-weight:normal; color:#006;}
</style>
<div id="ie6msg">
<h4>Did you know that your browser is out of date?</h4>
** Execute db:migrate
== AddPositionToEpisodes: migrating ==========================================
-- add_column(:episodes, :position, :integer, {:default=>0})
-> 0.0416s
rake aborted!
An error has occurred, this and all later migrations canceled:
undefined method `define_index' for #<Class:0x2b199d6b6a48>
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1964:in `method_missing_without_paginate'
/usr/lib/ruby/gems/1.8/gems/mislav-will_paginate-2.3.8/lib/will_paginate/finder.rb:168:in `method_missing'
.../config/preinitializer.rb:3: warning: already initialized constant APP_CONFIG
.../gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack.rb:17: warning: already initialized constant VERSION
Missing these required gems:
RedCloth >= 4.0
ryanb-acts-as-list
mislav-will_paginate
freelancing-god-thinking-sphinx
You're running:
ruby 1.8.6.286 at /opt/ruby-enterprise-1.8.6-20090201/bin/ruby
# download and git methods swiped from http://github.com/Sutto/rails-template/blob/07b044072f3fb0b40aea27b713ca61515250f5ec/rails_template.rb
require 'open-uri'
def download(from, to = from.split("/").last)
#run "curl -s -L #{from} > #{to}"
file to, open(from).read
rescue
puts "Can't get #{from} - Internet down?"
exit!
# download, from_repo, and commit_state methods swiped from
# http://github.com/Sutto/rails-template/blob/07b044072f3fb0b40aea27b713ca61515250f5ec/rails_template.rb
require 'open-uri'
def download(from, to = from.split("/").last)
#run "curl -s -L #{from} > #{to}"
file to, open(from).read
rescue
puts "Can't get #{from} - Internet down?"
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libvorbis configure 1.3.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/libvorbis/1.3.1
## --------- ##
@natebird
natebird / form_error_helper
Created November 13, 2010 19:55
Application helper to simplify the views in Rails3
# app/helpers/application_helper.rb
def form_errors(form)
if form.errors.any?
content_tag :h2, "#{pluralize(form.errors.count, 'error')} prohibited this #{form.class} from being saved:"
content_tag :ul
form.errors.full_messages.each do |msg|
content_tag :li, msg
end
end
end