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
| function CustomError () { | |
| this.message = "Custom error, yay!"; | |
| }; | |
| CustomError.prototype = Error.prototype; | |
| throw new CustomError(); |
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 | |
| # encoding: utf-8 | |
| require "open-uri" | |
| require "nokogiri" | |
| # Configuration. | |
| URL = "http://www.xe.com/ucc/convert/?Amount=1&From=GBP&To=%s" | |
| EMAIL = "[email protected]" | |
| NOTIFY_IF = {CZK: 30, EUR: 1.19} |
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
| 5195> ./scraper.rb list http://www.infojobs.net/ofertas-trabajo/programador | |
| ~ Listing jobs from http://www.infojobs.net/ofertas-trabajo/programador ... | |
| <jobs> | |
| <job> | |
| <role>Programador RIA AS3 Flex</role> | |
| <id>b22b0301664168b93f623d262ae759</id> | |
| </job> | |
| <job> |
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 | |
| # encoding: utf-8 | |
| require "open-uri" | |
| # Configuration. | |
| URL = "http://www.cnb.cz/cs/financni_trhy/devizovy_trh/kurzy_devizoveho_trhu/denni_kurz.txt" | |
| EMAIL = "[email protected]" | |
| # Helpers. |
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 | |
| # encoding: utf-8 | |
| # The purpose of this is: | |
| # connection = AMQP.connect | |
| # handler = MyKbdHandlerClass.new(connection) # SO I CAN ACCESS connection from within the handler class. | |
| # EM.open_keyboard(handler) | |
| require "eventmachine" |
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
| get %r{^/users/(?<nickname>\w+)/posts/(?<slug>[\w-]+)\.(?<extension>\w+)$} do | |
| p params[:nickname] | |
| 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
| ruby -ne 'puts $_' -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
| .rvmrc | |
| *.log | |
| *.pid |
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
| .rvmrc | |
| .bundle |
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
| --color | |
| --format nested |