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
2013-01-16 01:07:58 +0000: 128.250.5.248/user_16485/[email protected]: 200 in 129ms POST /profiles/david-forbes-16485/credentials => Profiles::CredentialsController#update.html {"utf8"=>"✓", "authenticity_token"=>"BLGwT+Z9N/6+6rJE+c0WcT3ZPkzFuhZZjq+c00T2TMA=", "author"=>{"honours"=>"", "qualifications_attributes"=>{"0"=>{"id"=>"", "_destroy"=>"", "institution"=>"University of Melbourne", "award"=>"B.A. (Hons) Psychology", "year"=>"1987"}, "1"=>{"id"=>"", "_destroy"=>"", "institution"=>"University of Melbourne", "award"=>"M.A. Clinical Psychology", "year"=>"1994"}, "2"=>{"id"=>"", "_destroy"=>"", "institution"=>"University of Melbourne", "award"=>"Ph.D", "year"=>"2005"}}, "grants_attributes"=>{"0"=>{"id"=>"", "_destroy"=>"", "title"=>"The effectiveness of Cognitive Processing Therapy (CPT) for VVCS clients with posttraumatic stress disorder (PTSD)", "year"=>"2007", "role"=>"", "funding_source"=>"Applied Research Program, Department of Veterans Affairs "}, "1"=>{"id"=>"", "_destroy"=>"", "title"=>"Developm |
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
require './plugins/babushka_provisioner' | |
Vagrant::Config.run do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = 'http://files.vagrantup.com/precise64.box' | |
config.vm.provision BabushkaProvisioner do |babs| | |
babs.dep 'benhoskings:ruby.src', :version => '1.9.3', :patchlevel => 'p327' | |
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
psql_output = `psql postgres -t -c 'SELECT replication_status()'`.strip | |
connected_at, master_pos, standby_pos, lag = psql_output.scan(/^\("(.*)",(.*),(.*),(.*)\)$/).flatten(1) |
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
> babushka git | |
git { | |
'git >= 1.6' is missing. | |
git.installer { | |
layout.fhs { | |
} ✓ layout.fhs | |
'git >= 1.8.0' is missing. | |
meet { | |
✓ Already downloaded git-1.8.0-intel-universal-snow-leopard.dmg. | |
Attaching git-1.8.0-intel-universal-snow-leopard.dmg... done. |
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
server { | |
listen [::]:80; | |
charset utf-8; | |
server_name ryanbigg.com www.ryanbigg.com; | |
if ($host !~ ^ryanbigg\.com$) { | |
rewrite ^(.*)$ http://ryanbigg.com$1 permanent; | |
} |
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
> uname -a | |
Darwin ben.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64 | |
> curl --version | |
curl 7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5 | |
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp | |
Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz | |
> curl -I -X GET "http://github.com/jashkenas/coffee-script/tarball/1.3.3" | |
HTTP/1.0 200 OK |
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
# Our data model has User (the main user class), and then | |
# Reader/Author/Editor/Intern class-table inheritance on UserBase. | |
# Unfortunately #current_user used to return one of those UserBase subclasses | |
# rather than a User. (Yuck.) I'm changing that at the moment. | |
# One thing that caught me: bits of code that say | |
if current_user == editor | |
# lol |
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
# Here are the aliases I use: | |
# https://github.com/benhoskings/dot-files/blob/master/files/.zsh/git_aliases | |
# Below are some of the things we talked about on Friday. | |
# Create a new commit using HEAD and the index with HEAD~ as its parent, | |
# instead of from just the index with HEAD as the parent |
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
(ns blag | |
(:use [clojure.java.jdbc]) | |
) | |
(def db { | |
:classname "org.postgresql.Driver" | |
:subprotocol "postgresql" | |
:subname "blag" | |
}) |
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
# Bad because the dependency on ModelClass and ApiClass are hard-coded | |
module HitTheApi | |
def self.go | |
ids_to_update = ModelClass.what_ids_should_I_update | |
ids_to_update.each do |id| | |
data = ApiClass.fetch_me_data(id) | |
ModelClass.persist_data(id, data) | |
end |