test
This file contains hidden or 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
def url=(addr) | |
super (addr.blank? || addr.starts_with?('http')) ? addr : "http://#{addr}" | |
end |
This file contains hidden or 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
# | |
# readrails 0.2 - an alias to open Textmate with the Rails source from Gems | |
# | |
alias readrails="mate `ruby -rubygems -e "puts( ['rails', 'activerecord', 'actionwebservice', 'activesupport'].collect { |gem| gems = Gem.source_index.find_name(gem); gems.last.full_gem_path; }.join(' '))"`" |
This file contains hidden or 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
List of helpful regular expressions (Emacs specific) | |
. any character (but newline) | |
* previous character or group repeated (0 or more time) | |
+ previous character or group repeated (1 or more time) | |
? previous charater or group repeated (0 or 1 time) | |
^ start of line | |
$ end of line | |
[...] any character between brackets | |
[^..] any character not between brackets |
This file contains hidden or 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
anil@anil-workstation:~/code/anildigital.github.com$ git symbolic-ref HEAD refs/heads/gh-page | |
anil@anil-workstation:~/code/anildigital.github.com$ rm .git/index | |
anil@anil-workstation:~/code/anildigital.github.com$ git clean -fx | |
Removing README | |
anil@anil-workstation:~/code/anildigital.github.com$ echo "My GitHub Page" > index.html | |
anil@anil-workstation:~/code/anildigital.github.com$ git add . | |
anil@anil-workstation:~/code/anildigital.github.com$ git commit -a -m "First pages commit" | |
Created initial commit 7458890: First pages commit | |
1 files changed, 1 insertions(+), 0 deletions(-) | |
create mode 100644 index.html |
This file contains hidden or 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
#!/usr/bin/env ruby | |
# Complete rake tasks script for bash | |
# Save it somewhere and then add | |
# complete -C path/to/script -o default rake | |
# to your ~/.bashrc | |
# Marty Haught (martyhaught.com) building on the work of many others: | |
# Francis Hwang ( http://fhwang.net/ ) | |
# Nicholas Seckar <[email protected]> | |
# Saimon Moore <[email protected]> |
This file contains hidden or 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
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0 | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Copyright 2006 The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking 0.0.0.0 (be patient) | |
Server Software: | |
Server Hostname: 0.0.0.0 | |
Server Port: 80 |
This file contains hidden or 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
anil-wadghules-computer:~/code/rails/planet anilwadghule$ cd .. | |
anil-wadghules-computer:~/code/rails anilwadghule$ mongrel_rails start | |
!!! Path to log file not valid: log/mongrel.log | |
mongrel::start reported an error. Use mongrel_rails mongrel::start -h to get help. | |
anil-wadghules-computer:~/code/rails anilwadghule$ cd planet | |
anil-wadghules-computer:~/code/rails/planet anilwadghule$ mongrel_rails start | |
** Starting Mongrel listening at 0.0.0.0:3000 | |
** Starting Rails with development environment... |