Skip to content

Instantly share code, notes, and snippets.

View mgutz's full-sized avatar

Mario Gutierrez mgutz

View GitHub Profile
assert.throws(
function() {
throw new Error("Wrong value");
},
Error
);
@mgutz
mgutz / gist:766621
Created January 5, 2011 17:22
sample javascript configuration
// define all common settings here
exports.common = {
storage: {
host: 'localhost',
database: 'server_dev',
user: 'qirogami_user',
password: 'password'
}
};
# get rid of these parens?
define('List').
oid('_id').
string('title').
string('description')
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>test.rb</title>
<link rel="stylesheet" href="http://github.com/jashkenas/docco/raw/0.3.0/resources/docco.css">
</head>
<body>
<div id='container'>
<div id="background"></div>
class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
t.string :login, :null => false # optional, you can use email instead, or both
t.string :email, :null => false # optional, you can use login instead, or both
t.string :crypted_password, :null => false # optional, see below
t.string :password_salt, :null => false # optional, but highly recommended
t.string :persistence_token, :null => false # required
t.string :single_access_token, :null => false # optional, see Authlogic::Session::Params
t.string :perishable_token, :null => false # optional, see Authlogic::Session::Perishability