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
| D, [2009-02-02 14:34:22 #3582] DEBUG -- : Rendering template: errors/not_found_404 | |
| W, [2009-02-02 14:34:22 #3582] WARN -- : http://localhost:3000/ not found. | |
| D, [2009-02-02 14:34:22 #3582] DEBUG -- : /Library/Ruby/Gems/1.8/gems/waves-0.8.2/lib/runtime/request.rb:63:in `not_found' | |
| D, [2009-02-02 14:34:22 #3582] DEBUG -- : /Library/Ruby/Gems/1.8/gems/waves-0.8.2/lib/runtime/response_mixin.rb:31:in `send' | |
| D, [2009-02-02 14:34:22 #3582] DEBUG -- : /Library/Ruby/Gems/1.8/gems/waves-0.8.2/lib/runtime/response_mixin.rb:31:in `not_found' | |
| D, [2009-02-02 14:34:22 #3582] DEBUG -- : /Library/Ruby/Gems/1.8/gems/waves-0.8.2/lib/resources/mixin.rb:120:in `__instance_exec_13288380' | |
| D, [2009-02-02 14:34:22 #3582] DEBUG -- : /Library/Ruby/Gems/1.8/gems/functor-0.5.1/lib/object.rb:11:in `send' | |
| D, [2009-02-02 14:34:22 #3582] DEBUG -- : /Library/Ruby/Gems/1.8/gems/functor-0.5.1/lib/object.rb:11:in `instance_exec' | |
| D, [2009-02-02 14:34:22 #3582] DEBUG -- : /Library/Ruby/Gems/1.8/gems/functor-0.5 |
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
| require "win32ole" | |
| itunes = WIN32OLE.new('iTunes.Application') | |
| library = itunes.LibraryPlaylist | |
| tracks = library.Tracks | |
| c = 1 | |
| while (c < tracks.count ) | |
| if (tracks[c].Location == "" && tracks[c].BitRate > 0) | |
| #puts tracks[c].Location + " " + tracks[c].Artist + " : " + tracks[c].Name | |
| tracks[c].delete | |
| else |
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 everyday_im_knuth_shuffling( arr_list ) | |
| (arr_list.length-1).downto(0).each {|i| | |
| n = rand(i + 1) | |
| # swap | |
| tmp = arr_list[n] | |
| arr_list[n] = arr_list[i] | |
| arr_list[i] = tmp | |
| } | |
| arr_list | |
| 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
| & 'C:\Program Files (x86)\PuTTY\plink.exe' -agent -v -i <location of .ppk file> [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
| def caesar_encrypt(str,sft=0) | |
| atoz = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
| str.upcase.tr( atoz, atoz[sft..-1]+atoz[0..(sft-1)]) | |
| end | |
| def caesar_decrypt(str,sft=0) | |
| atoz = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
| str.upcase.tr( atoz[sft..-1]+atoz[0..(sft-1)], atoz) | |
| 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
| Search for: (^\s+)(function [a-zA-Z]+)\( | |
| Replace with: $1/*\n\n$1$2\n\n$1input: \n$1output: \n\n$1*/\n$1$2( | |
| Generates: | |
| /* | |
| function testFunction | |
| input: |
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
| # quarter = what quarter | |
| # mins_left | |
| # secs_left: whatever the timer in the game says. So if its 4th quarter, with 3:23 left to play means you play mins = 3, secs = 23 | |
| # team1_score: score of team #1 | |
| # team2_score: score of team #2 | |
| # goal: how many points team1 + team2 are suppose to make. | |
| def pace(quarter, mins_left, secs_left = 0, team1_score, team2_score, goal) | |
| total_time = 48*60 # 48 minutes in a game |
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
| :set tabstop=2 | |
| :set shiftwidth=2 | |
| :set expandtab | |
| :set number |
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
| # grep while excluding .svn directories if your grep version <= 2.5.1 and does not have exclude-dir | |
| grep -Iir --exclude="*\.svn*" "<pattern>" * |
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
| # 'xargs kill -9' after making sure you're not killing anything other than node | |
| ps aux | grep "node" | grep -v "grep node" | cut -c 16-20 |
OlderNewer