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 'rubygems' | |
| require 'active_support' | |
| require 'vendor/plugins/lighthouse-api/lib/lighthouse' | |
| usage = "USAGE: ruby lighthouse_reassign api-key account-subdomain project-id milestone_to_move_from milestone_to_move_to" | |
| token = $ARGV[0] | |
| subdomain = $ARGV[1] | |
| project_id = $ARGV[2].to_i | |
| milestone_to_move_from = $ARGV[3].to_i | |
| milestone_to_move_to = $ARGV[4].to_i |
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 'rubygems' | |
| require 'RMagick' | |
| size = [85,85] | |
| dst = Magick::Image.read("frame2.svg") { | |
| self.background_color = 'white' | |
| }.first | |
| src = Magick::Image.read('lime.jpg').first |
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
| I had issues with the instructions on weblog.rubyonrails.org. | |
| gem install rails --source http://gems.rubyonrails.org | |
| What did work was. | |
| sudo gem install rack | |
| sudo gem install rails --source http://gems.rubyonrails.org --version 2.3.0 |
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
| => Booting Mongrel | |
| => Rails 2.3.2 application starting on http://0.0.0.0:3000 | |
| => Call with -d to detach | |
| => Ctrl-C to shutdown server | |
| SQL (0.3ms) SET NAMES 'utf8' | |
| SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 | |
| Processing TestController#index (for 127.0.0.1 at 2009-03-23 17:20:16) [GET] | |
| Rendering test/index |
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
| 2009-08-01 13:37:06 INFO: Launcher.Launcher | |
| 2009-08-01 13:37:06 INFO: Launcher.createAndShowGUI | |
| 2009-08-01 13:37:07 INFO: Session start time = 2009-08-01T13:37:07.249+01:00 | |
| 2009-08-01 13:37:07 INFO: Today start time = 2009-08-01T00:00:00.000+01:00 | |
| 2009-08-01 13:37:08 INFO: MenuBarFactory.createMenuBar | |
| 2009-08-01 13:37:08 INFO: ToolbarFactory.createToolBar | |
| 2009-08-01 13:37:08 INFO: MenuBarFactory.createMenuBar | |
| 2009-08-01 13:37:08 INFO: Launcher.registerForMacOSXEvents | |
| 2009-08-01 13:37:08 INFO: MenuBarFactory.createMenuBar | |
| 2009-08-01 13:37:09 INFO: MuckedCardsWindow.MuckedCardsWindow |
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 'net/http' | |
| HOST = "http://www.mymobileapi.com" | |
| PORT = 80 | |
| def log!(message) | |
| STDERR.puts "#{Time.now.to_s} #{message}" | |
| end | |
| def call_remote(method, params) |
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
| error: function(XMLHttpRequest, textStatus, errorThrown) { | |
| var response = XMLHttpRequest.responseText; | |
| var start = response.indexOf('('); | |
| var finish = response.indexOf(')'); | |
| var json = JSON.parse( response.substring(start+1,finish) ); | |
| $status.text(json['error']); | |
| } |
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
| "Authorization": { | |
| "oauth_consumer_key": "xxx", | |
| "oauth_nonce": new Date().getTime(), | |
| "oauth_signature_method": "HMAC-SHA1", | |
| "oauth_timestamp": new Date().getTime(), | |
| "oauth_version": "1.0", | |
| } | |
| // Need to get into the format. |
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
| POST /oauth/request_token HTTP/1.1 | |
| Host: twitter.com | |
| Authorization: OAuth realm="", | |
| oauth_consumer_key="cV3cvjwaUW6GKoz55nkc8A", | |
| oauth_nonce="9844f81e1408f6ecb932137d33bed7cfdcf518a3", | |
| oauth_signature_method="HMAC-SHA1", | |
| oauth_timestamp="1265944827491", | |
| oauth_version="1.0", | |
| oauth_signature="Wew/m+9v023JD7pv59QZDGixTJc" | |
| Connection: close |
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
| var items = [] | |
| // items.push({data: "..."}) | |
| // called somewhere in the code | |
| function worker_loop(){ | |
| while(true == true){ | |
| if(items.length>0){ | |
| do_work(items.shift()) | |
| } else { |
OlderNewer