$ uname -r
This file contains 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
// keylog.c | |
// | |
// Usage: | |
// ./keylog [command ...] | |
// | |
// This runs the given command, capturing all keyboard input in the file | |
// "outfile." This is currently written for mac os x. I'm guessing slight edits | |
// would allow it to work on other *nix systems as well. | |
// | |
// I learned how to do this by looking at the source of the "script" binary, |
This file contains 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
{ | |
"Abu Dhabi": "Asia/Muscat", | |
"Adelaide": "Australia/Adelaide", | |
"Alaska": "America/Juneau", | |
"Almaty": "Asia/Almaty", | |
"American Samoa": "Pacific/Pago_Pago", | |
"Amsterdam": "Europe/Amsterdam", | |
"Arizona": "America/Phoenix", | |
"Astana": "Asia/Dhaka", | |
"Athens": "Europe/Athens", |
This file contains 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
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |