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
wget http://cdni.wired.co.uk/1240x826/g_j/hiroshi1.jpg && osascript -e 'tell application "Finder" to set desktop picture to POSIX file "'`pwd`'/hiroshi1.jpg"' |
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
echo "scale=2; `history | grep 'git blame' | wc -l` * 100 / `history | grep 'git ' | wc -l`" | bc | sed 's/$/%/' |
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
$ rake routes | |
Prefix Verb URI Pattern Controller#Action | |
books GET /books(.:format) books#index | |
POST /books(.:format) books#create | |
new_book GET /books/new(.:format) books#new | |
edit_book GET /books/:id/edit(.:format) books#edit | |
book GET /books/:id(.:format) books#show | |
PATCH /books/:id(.:format) books#update | |
PUT /books/:id(.:format) books#update | |
DELETE /books/:id(.:format) books#destroy |
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
rake routes | grep -v PUT | gsed -e 's/^.* \(Verb\|GET\|POST\|PATCH\|DELETE\)/\1 /g' -e 's/(.:format)/ /g' -e 's/ {:format=>.*}//g' -e 's/Pattern \{8\}/Pattern/g' -e 's/ \/ \{8\}/ \//' |
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
<% 1000.times do |n| %> | |
user_<%= n %>: | |
username: <%= "user#{n}" %> | |
email: <%= "user#{n}@example.com" %> | |
<% 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
default: &default | |
name: name | |
email: email | |
column_a: column_a | |
column_b: column_b | |
column_c: column_c | |
column_d: column_d | |
column_e: column_e | |
fred: |
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
pdftk file1.pdf file2.pdf file3.pdf output all.pdf |
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
pdftk `curl http://guides.rubyonrails.org/ | grep '<dt><a href' | gsed 's/.*href="\(.*\).html".*/\1.pdf/g'` output RailsGuides.pdf |
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
for i in `curl http://guides.rubyonrails.org/ | grep '<dt><a href' | gsed 's/.*href="\(.*\).html".*/\1.html/g'` | |
do | |
URL=http://guides.rubyonrails.org/$i; curl $URL | gsed -e '3i <base href="'$URL'">' -e 's/"\(topNav\|header\)"/"\1" style="display:none"/g' | wkhtmltopdf - `basename $URL .html`.pdf | |
done |
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
URL=http://guides.rubyonrails.org/getting_started.html; curl $URL | gsed -e '3i <base href="'$URL'">' -e 's/"\(topNav\|header\)"/"\1" style="display:none"/g' | wkhtmltopdf - `basename $URL .html`.pdf |