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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <response> | |
| <status>ACCEPTED</status> | |
| <order-id type="integer">ORDER_ID_HERE</order-id> | |
| </response> |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <response> | |
| <status>REJECTED</status> | |
| <error>One or more order items are invalid</error> | |
| </response> | |
| or | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <response> |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <response> | |
| <status>ERROR</status> | |
| <error>An internal exception was thrown.</error> | |
| </response> |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <custom-order> | |
| <aasm-state>new</aasm-state> | |
| <company-id type="integer">1</company-id> | |
| <completed-at type="datetime" nil="true"></completed-at> | |
| <created-at type="datetime">2009-12-01T13:47:32-07:00</created-at> | |
| <deleted-at type="datetime" nil="true"></deleted-at> | |
| <id type="integer">30</id> | |
| <job-id type="integer" nil="true"></job-id> | |
| <shipping-address-1>123 Easy St</shipping-address-1> |
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
| <?php | |
| require_once "HTTP/Request.php"; | |
| $xml = " | |
| <?xml version=\"1.0\" encoding=\"UTF-8\"?> | |
| <order> | |
| <company-id>1</company-id> | |
| <shipping-profile>t1</shipping-profile> | |
| <shipping-full-name>John Doe</shipping-full-name> | |
| <shipping-care-of/> |
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
| RAILS RUNNER APPLICATION IN 10 STEPS !!! | |
| 1.- rails runner -d mysql | |
| 2.- cd runner | |
| 3.- Edit config/database.yml | |
| 4.- rake db:create | |
| 5.- ./script/generate scaffold Md5 password:string md5hash:string | |
| 6.- rake db:migrate | |
| 7.- irb DEMO | |
| puts "Hello World" |
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
| # ---------- example.rb ---------- | |
| #!/usr/bin/ruby | |
| # Determine our parent pid | |
| puts Process.pid | |
| 10.times do | |
| puts "Before fork" | |
| pid = fork do |
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 'twitter' | |
| require 'ruby-growl' | |
| last_tweet_id = 0 | |
| loop do | |
| result = Twitter::Search.new('teachmetocode').since(last_tweet_id).fetch().results.first | |
| if result | |
| from_user = result[:from_user] |
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
| RAILS RUNNER APPLICATION IN 10 STEPS !!! | |
| 1.- rails runner -d mysql | |
| 2.- cd runner | |
| 3.- Edit config/database.yml | |
| 4.- rake db:create | |
| 5.- ./script/generate scaffold Md5 password:string md5hash:string | |
| 6.- rake db:migrate | |
| 7.- irb DEMO | |
| puts "Hello World" |
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
| RAILS SHELL APPLICATION IN 10 STEPS !!! | |
| 1.- rails shell -d mysql | |
| 2.- cd shell | |
| 3.- Edit config/database.yml | |
| 4.- rake db:create | |
| 5.- ruby script\generate scaffold Command execute:string | |
| 6.- rake db:migrate | |
| 7.- Delete public/index.html | |
| 8.- Edit config/routes.rb | |
| map.resources :commands |