Based on:
$ sudo apt-get install python-software-properties
<%= select(:address, :state, [ | |
['Select a State', 'None'], | |
['Alabama', 'AL'], | |
['Alaska', 'AK'], | |
['Arizona', 'AZ'], | |
['Arkansas', 'AR'], | |
['California', 'CA'], | |
['Colorado', 'CO'], | |
['Connecticut', 'CT'], | |
['Delaware', 'DE'], |
Based on:
$ sudo apt-get install python-software-properties
You could have postgre installed on localhost with password (or without user or password seted after instalation) but if we are developing we really don't need password, so configuring postgre server without password for all your rails project is usefull.
#!/bin/sh | |
# | |
# Setup a work space called `work` with two windows | |
# first window has 3 panes. | |
# The first pane set at 65%, split horizontally, set to api root and running vim | |
# pane 2 is split at 25% and running redis-server | |
# pane 3 is set to api root and bash prompt. | |
# note: `api` aliased to `cd ~/path/to/work` | |
# | |
session="work" |
-- SQL Basic Syntax -- | |
--initialize SQLite database w/ command line: | |
sqlite3 database_name.db | |
--helpful commands | |
.help -- list of commands | |
.tables -- see all tables | |
.mode column / .header on -- helpful for viewing |
" Running Tests... | |
" See also <https://gist.github.com/8114940> | |
" Run currently open RSpec test file | |
map <Leader>rf :w<cr>:!rspec % --format nested<cr> | |
" Run current RSpec test | |
" RSpec is clever enough to work out test to run if cursor is on any line within the test | |
map <Leader>rl :w<cr>:exe "!rspec %" . ":" . line(".")<cr> |
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
#gem 'colorize' | |
module Version | |
VERSION_FILE = "#{Rails.root}/config/initializers/version.rb" | |
PATTERN = /(\d+)\.(\d+)\.(\d+)-(.*)/ | |
PATTERN_NOMETA = /(\d+\.\d+\.\d+)/ | |
@@major = 0; @@minor = 0; @@patch = 0; @@build = 'a' | |
@@version_rb = File.read(VERSION_FILE) | |
def self.version_rb |
1) In your terminal, open the file using vim: | |
vim file_name | |
2) Remove all BOM characters: | |
:set nobomb | |
3) Save the file: | |
:wq |
lsusb -v 2> /dev/null | grep -e "Apple Inc" -A 2 |