I hereby claim:
- I am dwradcliffe on github.
- I am dwradcliffe (https://keybase.io/dwradcliffe) on keybase.
- I have a public key whose fingerprint is 7DA4 5F36 4145 8746 93E4 E73C 330F 18D7 51B6 5B7A
To claim this, I am signing this object:
Vagrant.configure("2") do |config| | |
config.vm.box = "opscode_centos-6.4_chef-provisionerless" | |
config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.4_chef-provisionerless.box" | |
config.vm.provision "shell", | |
path: 'https://gist.githubusercontent.com/dwradcliffe/9329745/raw/7b4860e8b253d510dc6e3bd6b075c179b9f92156/gistfile1.sh' | |
end |
I hereby claim:
To claim this, I am signing this object:
class GenerateAnonymousUsers < ActiveRecord::Migration | |
def self.up | |
User.reset_column_information | |
puts Order.where(:user_id => nil).where(:state != "balance_due").count.to_s + " remaining..." | |
Order.where(:user_id => nil).where(:state != "balance_due").each do |order| | |
user = User.anonymous! | |
user.email ||= order.email | |
puts user.login | |
user.save! | |
order.update_attribute_without_callbacks("user_id", user.id) |
require File.dirname(__FILE__) + '/config/environment' | |
run ActionController::Dispatcher.new |
#!/bin/bash | |
apt-get install ssh build-essential | |
wget http://rubyenterpriseedition.googlecode.com/files/ruby-enterprise_1.8.7-2011.03_i386_ubuntu10.04.deb | |
dpkg -i ruby-enterprise_1.8.7-2011.03_i386_ubuntu10.04.deb | |
gem install chef --no-ri --no-rdoc |
Noah Coffey (@noahwesley) built a great little tool (http://quitgodaddy.com) to help people | |
move their domains off GoDaddy by reminding them before the expiration dates. | |
I have a whole bunch of domains on 1&1 (another horrible company) and wanted to use Noah's tool. | |
He was kind enough to provide the proper format and I wrote a quick script to pull all my domains | |
off the 1&1 admin page. | |
How to use: | |
Navigate to your domains page. Select 100 domains on a page. You'll have to do the following |
#!/bin/bash | |
curl -# $* | ruby -e "require 'rubygems';require 'json';require 'awesome_print'; ap JSON.parse(STDIN.gets)" |
window.MyView = Backbone.View.extend({ | |
initialize: -> | |
_.bindAll(this,'render') | |
this.template = window.JST["MyView"] | |
this.model.bind('change', this.render) | |
render: -> | |
$(this.el).html(this.template(this.model.toJSON())) | |
events: { |
class Player < ActiveRecord::Base | |
def salary_valid_for_year? year | |
send("s#{year}") != 0 && send("status#{year}") != 0 && !send("status#{year}").nil? | |
end | |
def salary_for_year year | |
send("s#{year}") | |
end |
{ | |
"id": "rubygems", | |
"application": { | |
"production": { | |
"rails_postgresql_host" : "", | |
"rails_postgresql_db": "", | |
"rails_postgresql_user": "", | |
"rails_postgresql_password": "", | |
"s3_key": "", | |
"s3_secret": "", |