Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
# Gemfile | |
source 'https://rubygems.org' | |
ruby "2.0.0" | |
gem 'rails', '~> 4.0.0' | |
... | |
group :development do | |
gem 'better_errors' |
// /Gruntfile.js | |
// task that is intended to be run by us | |
grunt.registerTask('server', "Run your server in development mode, auto-rebuilding when files change.", function(proxyMethod) { | |
... | |
grunt.task.run(['clean:debug', | |
'build:debug', | |
expressServerTask, | |
'watch' | |
]); |
// app/helpers/dev.js | |
Object.defineProperty(window, 'ac', { | |
get: function () { | |
return window.container.lookup('controller:application'); | |
} | |
}); | |
// CurrentRoute - NOT WORKING (WHYYYYY?) | |
Object.defineProperty(window, 'currentRouteNotWorking', { |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<script src="http://masonry.desandro.com/masonry.pkgd.min.js"></script> | |
<style> | |
.item { width: 150px;} | |
.item.w2 { width: 300px; } | |
img {width: 100%;} | |
</style> |
Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X) | |
(if you aren't using version 9.1.5, change line 6 with the correct version) | |
1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
2. mv /usr/local/var/postgres /usr/local/var/postgres91 | |
3. brew update | |
4. brew upgrade postgresql | |
5. initdb /usr/local/var/postgres -E utf8 | |
6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres | |
7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ |
# The problem: | |
# Write a triangle method that accepts three numbers as arguments. The method should return a print | |
# whether the three lengths form an equilateral, isosceles, or scalene triangle. | |
# | |
# We were just learning to define methods, and having learned if/else statements and touched on | |
# ternary statements, so we just wanted to make it as concise as we could with our limited knowledge :) | |
# | |
module InWords | |
def in_words | |
places=1 | |
num = self | |
while(num/10 != 0) | |
places num+= 1 | |
num = num/10 | |
end | |
if self>1000 |
module Todo | |
class List | |
def initialize(file_path) | |
@file_path = file_path | |
@tasks = parse_tasks(File.read(@file_path)) | |
end | |
def parse_tasks(text) | |
# we use #collect here so that we will return an array of tasks | |
text.split("\n").collect do |line| |
require 'rspec' | |
describe "Schulze" do | |
before :each do | |
@ballots = [['q','f','b'],['f','b','q'],['q','f','b']] | |
@ballots2 = [['f','q','b'],['f','b','q'],['q','f','b']] | |
@schulze = Schulze.new @ballots | |
@schulze_twin = Schulze.new @ballots2 | |
end |