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
| javascript:(function(){location.href="http://www.google.com/search?q=cache:"+escape(location.href.replace(/^http%5C:%5C/%5C/(.*)$/,"$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
| # https post a payload to a web server with basic authentication | |
| require 'net/https' | |
| requests = 1 | |
| protocol = 'https' | |
| host = 'example.com' | |
| port = 80 | |
| user = 'example_username' | |
| pass = 'example_password' | |
| path = '/some/path' |
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
| # prints the current month in plain text format | |
| require 'rubygems' | |
| require 'activesupport' | |
| # Extend the built-in String class with methods to center a string | |
| class String | |
| # Returns a copy of the string padded with spaces on both the left and the | |
| # right so it is centered within the desired length | |
| def center(length) | |
| self.dup.center!(length) |
NewerOlder