Brew command:
brew install postgresql
follow LaunchAgents instructions, and run this:
initdb -E utf8 -D /usr/local/var/postgres
if you have any problem with shared memory: just **restart**
# encoding: UTF-8 | |
# pt-BR translations for Devise | |
pt-BR: | |
errors: | |
messages: | |
not_found: "não encontrado" | |
already_confirmed: "já foi confirmado" | |
not_locked: "não foi bloqueado" | |
not_saved: | |
one: "Não foi possível salvar %{resource}: 1 erro" |
# encoding: UTF-8 | |
# pt-BR translations for Ruby on Rails | |
"pt-BR": | |
# formatos de data e hora | |
date: | |
formats: | |
default: "%d/%m/%Y" | |
short: "%d de %B" | |
long: "%d de %B de %Y" |
defaults write com.apple.finder QLEnableTextSelection -bool TRUE; killall Finder |
class Chess | |
def self.board | |
board = [] | |
('a'..'h').map do |w| | |
line = [] | |
('1'..'8').each do |h| | |
line.push w + h | |
end | |
board.push line | |
end |
#!/bin/bash | |
# Author: Brenno Costa | |
[email protected] | |
function echo_ssh_in_authorized_keys() | |
{ | |
cat ~/.ssh/id_rsa.pub | ssh [email protected] 'cat >> ~/.ssh/authorized_keys' | |
} |
#! /bin/bash | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# 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 unicorn web server | |
# Description: starts unicorn |
sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev |
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="gallois" | |
# Example aliases |
Brew command:
brew install postgresql
follow LaunchAgents instructions, and run this:
initdb -E utf8 -D /usr/local/var/postgres
if you have any problem with shared memory: just **restart**
class PostsController < ActionController::Base | |
def create | |
Post.create(post_params) | |
end | |
def update | |
Post.find(params[:id]).update_attributes!(post_params) | |
end | |
private |