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
# from: http://kfahlgren.com/blog/2006/11/01/multipart-post-in-ruby-2/ | |
# edited by makevoid, http://makevoid.com | |
URL = "http://localhost:3000/your_url" | |
TIMEOUT_SECONDS = 10 | |
params = {} | |
file = File.open(filename, "rb") | |
params["file[replay]"] = file |
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
HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |
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
//Anonymous procedure approach by Lars Fosdal | |
type | |
TArg<T> = reference to procedure(const Arg: T); | |
procedure TForm1.CaptureConsoleOutput(const ACommand, AParameters: String; CallBack: TArg<PAnsiChar>); | |
const | |
CReadBuffer = 2400; | |
var | |
saSecurity: TSecurityAttributes; | |
hRead: THandle; |
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 | |
some sort of constant hash: | |
HASH_NAME = { | |
0 => "Choose:", | |
1 => "On-Campus Recruiting - CSO",· | |
2 => "CSO Staff Referral", | |
3 => "Faculty Contact",· | |
4 => "Career Day",· | |
5 => "CSO Summer Job Listing",· | |
6 => "Alumni Contact",· |