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
rvm upgrade `rvm list strings | grep ruby-1.9.2` 1.9.2 |
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
[23/09/2011 16:46:55] Steve Woodcock: what's this aeropress coffee all about then? | |
[23/09/2011 16:55:07] Omar Qureshi: its like a big fuck off tube | |
[23/09/2011 16:55:38] Lydia Grove: Sometimes it seems a crime to me that Omar doesn't work in marketing |
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
var mongoose = require('mongoose'); | |
var _ = require('underscore'); | |
var models = {} | |
var Schema = mongoose.Schema, ObjectId = Schema.ObjectId; | |
var TimestampProperties = { | |
created_at : Date, | |
updated_at : Date | |
} |
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
var mongoose = require('mongoose'); | |
var _ = require('underscore'); | |
var models = {}; | |
var Schema = mongoose.Schema, ObjectId = Schema.ObjectId; | |
var bcrypt = require('bcrypt'); | |
var TimestampProperties = { | |
created_at : Date, | |
updated_at : Date | |
} |
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
passenger-install-nginx-module --auto-download --auto |
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
<?php | |
class Bcrypt | |
{ | |
const DEFAULT_WORK_FACTOR = 8; | |
public static function hash($password, $work_factor = 0) | |
{ | |
if (version_compare(PHP_VERSION, '5.3') < 0) throw new Exception('Bcrypt requires PHP 5.3 or above'); |
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
class Friendship < ActiveRecord::Base | |
belongs_to :user | |
belongs_to :friend, :class_name => "User" | |
validates_presence_of :friend_id | |
validates_presence_of :user_id | |
validates_inclusion_of :accepted, :in => [true, false] | |
validates_uniqueness_of :friend_id, :scope => [:user_id] | |
validate :unique_friendship_record, :cannot_be_own_friend | |
attr_accessible :user_id, :friend_id | |
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 "auto_validate/version" | |
require "active_record" | |
# First run for this application will be JUST PostgreSQL, just as a | |
# proof of concept - currently all tests are running solely against | |
# 9.1, though a lot of this should work for anything over 8 | |
# | |
# | |
# Reference for this class is at | |
# http://www.postgresql.org/docs/current/static/catalog-pg-constraint.html |
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
#user nobody; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; | |
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
function emacs() { | |
(/usr/local/bin/emacs $1 &) | |
} |