This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When I tried run "rake test", I received: | |
rake aborted! | |
cannot load such file -- openssl | |
Tasks: TOP => test:units => test:prepare => db:test:prepare => db:abort_if_pending_migrations => environment | |
(See full trace by running task with --trace) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bundle install | |
Fetching source index for http://rubygems.org/ | |
Using rake (0.9.2.2) | |
Using ZenTest (4.6.2) | |
Using RubyInline (3.11.1) | |
Using sexp_processor (3.0.10) | |
Using ParseTree (3.0.8) | |
Using multi_json (1.0.4) | |
Using activesupport (3.1.3) | |
Using builder (3.0.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.9.2-p290 :001 > Date.today | |
NoMethodError: undefined method `today' for Date:Class | |
from (irb):1 | |
from /home/irio/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `<main>' | |
1.9.2-p290 :002 > require 'date' | |
=> true | |
1.9.2-p290 :003 > Date.today | |
=> #<Date: 2012-02-22 (4911959/2,0,2299161)> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get install postgresql libpq-dev postgresql-contrib | |
$ sudo -u postgres createuser desired_user | |
$ cd /etc/init.d/ | |
$ sudo -u postgres psql template1 | |
template1=# ALTER USER desired_user WITH PASSWORD 'desired_password'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First of all, get the commit's hash. Then... | |
$ git branch new_branch_name c06d29d2ae420ade7adce4f7489c7b4f96694eb4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git fetch RemoteName | |
$ git checkout RemoteName/branch_name | |
$ git checkout -b RemoteName_branch_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install server | |
[youruser@host]$ sudo yum install postgresql-server | |
# set password | |
[youruser@host]$ sudo passwd postgres | |
# create cluster | |
[youruser@host]$ sudo mkdir -p /usr/local/pgsql/ | |
[youruser@host]$ sudo chown postgres /usr/local/pgsql/ | |
[youruser@host]$ su postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## One file | |
$ scp my_file_name.mp3 user@ip:/home/user/destination/folder | |
## More than one file | |
# Pattern | |
$ scp *.mp3 user@ip:/home/user/destination/folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#largely based on http://devblog.michaelgalero.com/2008/11/03/custom-rake-tasks-in-merb-data-import/ | |
require 'rake' | |
ENV['ENVIRONMENT'] = 'test' if ENV['ENVIRONMENT'].nil? | |
# DB tasks | |
namespace :db do | |
require 'dm-core' | |
require 'dm-types' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Comma/Space/Enter are all valid delimiters for new tags, | |
// except when there is an open quote or if setting allowSpaces = true. | |
// Tab will also create a tag, unless the tag input is empty, in which case it isn't caught. | |
if ( | |
event.which == $.ui.keyCode.COMMA || | |
event.which == $.ui.keyCode.ENTER || | |
( | |
event.which == $.ui.keyCode.TAB && | |
that._tagInput.val() !== '' | |
) || |
OlderNewer