Skip to content

Instantly share code, notes, and snippets.

View sidazhang's full-sized avatar

Sidney Zhang sidazhang

  • Facebook
  • San Francisco
View GitHub Profile
def classic_roman(int)
# initialise variable
num = int
num = num.to_f
output = []
# initialise keys
numeral_to_value = {
1 => "I",
@sidazhang
sidazhang / index.html
Created May 2, 2013 19:11 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------
// DRIVER CODE: Do **NOT** change anything below this point. Your task is to implement code above to make this work.
//------------------------------------------------------------------------------------------------------------------
require 'rspec'
require_relative '../assessment_week2'
describe Vehicle do
subject { Vehicle.new(Hash[color: "black", wheels: 2]) }
it { should be_instance_of Vehicle }
its (:wheels) { should == 2 }
$ psql -U postgres

### CREATION w/o Password
$ createuser
# fill shit in
$ createdb <databasename>
$ psql -U postgres
$ alter user <username>;
# ALTER USER