A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
gem 'pg' | |
group :development do | |
gem 'ruby-debug' | |
end | |
gem 'rake', '~> 0.8.7' | |
gem 'devise' | |
gem 'oa-oauth', :require => 'omniauth/oauth' | |
gem 'omniauth' | |
gem 'haml' | |
gem 'dynamic_form' |
class PostsController < ActionController::Base | |
def create | |
Post.create(post_params) | |
end | |
def update | |
Post.find(params[:id]).update_attributes!(post_params) | |
end | |
private |
// | |
// Typical Prototype composure in JS; This is the classical way of creating and | |
// using objects in JS. | |
// | |
// "Super" or "Parent" object prototype | |
function Cat(color) { | |
this.color = color; | |
this.saying = 'meowwww'; | |
} |
#!/usr/bin/python | |
from pyquery import PyQuery as pq | |
import re | |
import datetime | |
print datetime.datetime.now().strftime('%c') | |
doc = pq(url='http://www.beermenus.com/places/4733-the-ruck') |
# Gemfile | |
gem "puma" | |
# Procfile | |
web: bundle exec puma -p $PORT -e $RACK_ENV -C config/puma.rb | |
# add to config block config/environments/production.rb | |
config.threadsafe! | |
# get rid of NewRelic after_fork code, if you were doing this: |
Mountain Lion Web Sharing | |
Apache/WebSharing | |
The first difference in the new OS X 10.8 is the dropping of the GUI option to turn on Web Sharing in the System Preferences, it may be gone but Apache is definitely installed in the lower level of the OS and ready to go. | |
No Web Sharing Option in System Preferences | |
Apache is pre-installed and needs to be enabled via the command line - /Applications/Utilities/Terminal |
describe 'App.HeaderModule', -> | |
beforeEach -> | |
@headerModule = window.App.HeaderModule | |
it 'should exist', -> | |
expect(@headerModule).not.toBeUndefined() | |
describe 'starting', -> |
require 'spec_helper' | |
# Bustle is a pubsub system used for activity streams: | |
# https://github.com/fredwu/bustle | |
# | |
# Here when a person follows another (or a discussion, for instance), the observer wires | |
# up pubsub between them for future activity notifications. The Follow model knows nothing | |
# about the implementation choices for the pubsub system. | |
describe FollowObserver do | |
subject { FollowObserver.instance } |