brew update brew install postgresql
Create a database:
initdb /usr/local/var/postgres
If this is your first install, automatically load on login with:
mkdir -p ~/Library/LaunchAgents
mkdir ~/.ssh | |
chmod 700 ~/.ssh | |
ssh-keygen -t rsa |
create database new_vegas_prod default character set utf8; | |
grant all privileges on new_vegas_prod.* to new_vegas_prod@localhost identified by 'pass'; |
update-rc.d nginx defaults |
set :application, "new-vegas" | |
set :repository, "[email protected]:mdominiak/new-vegas.git" | |
set :scm, :git | |
set :host, "newvegas.vault106.com" | |
set :user, "deploy" | |
set :use_sudo, false | |
set :deploy_to, "/home/deploy/new-vegas/production" | |
role :web, host |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
def error_messages_for(resource) | |
return "" if resource.errors.empty? | |
messages = resource.errors.full_messages.map { |msg| content_tag(:li, msg) }.join | |
sentence = "Please fix the following errors:" | |
html = <<-HTML | |
<div class="error_explanation"> | |
<div class="title">#{sentence}</div> | |
<ul>#{messages}</ul> |
Ruby is terse. Getters and setters example. | |
Java: | |
Class Circle { | |
private Coordinate center, float radius; | |
public void setCenter(Coordinate center) { | |
this.center = center; | |
} | |
public Coordinate getCenter() { |
defaults -currentHost write -globalDomain AppleFontSmoothing -int 2 |
# Assumptions: rbenv and ruby-build installed with brew | |
# Update brew formulas | |
brew update | |
# Upgrade rbenv and ruby-build | |
brew upgrade rbenv ruby-build | |
# List available ruby versions | |
rbenv install --list |