Skip to content

Instantly share code, notes, and snippets.

View chrismanderson's full-sized avatar

Chris Anderson chrismanderson

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>ThinAuth</title>
<link href="/assets/application-7270767b2a9e9fff880aa5de378ca791.css" media="all" rel="stylesheet" type="text/css" />
<script src="/assets/application-990a4cf0df42934fcc4c14aaf88b7ced.js" type="text/javascript"></script>
<meta content="authenticity_token" name="csrf-param" />
<meta content="1W3NM3IJuIgxScltwWBmilWuuCQhcKMFV3jULKoPUNA=" name="csrf-token" />
</head>
@chrismanderson
chrismanderson / gist:2838249
Created May 30, 2012 18:48
clarified gist

To set the root user password. From terminal.

 /usr/local/Cellar/mysql/5.5.20/bin/mysqladmin -u root password 'enter_a_password'

Then do

 mysql --user=root --password=enter_a_password

In the mysql command prompt:

//
// MasterViewController.m
// ShoeEngine
//
// Created by Chris Anderson on 4/19/12.
// Copyright (c) 2012 The Winston Group. All rights reserved.
//
#import "MasterViewController.h"
@chrismanderson
chrismanderson / bools
Created April 4, 2012 18:34
boolean tests
# in model
validates :admin, :inclusion => { :in => [true, false] }
# the test
it "rejects invalid admin state" do
non_admin_user = User.new(@attr.merge(:admin => "is administrator"))
non_admin_user.should_not be_valid
end