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
| # this is still fucking rad! | |
| class SendRecorder < BlankSlate | |
| def initialize(host) | |
| @__host__ = host | |
| @__called__ = [] | |
| end | |
| attr_reader :__host__, :__called__ | |
| def __called?(method) | |
| __called__.include? method.to_sym |
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
| /** Console X | |
| * | |
| * prevents console errors and makes IE console objects true functions | |
| * | |
| */ | |
| (function() { | |
| window.console || (window.console = {}); | |
| var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", | |
| "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; |
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
| // the base Klass object that all Klasses are extended from | |
| var Klass; | |
| // calling new class creates a new class | |
| var Frog = klass.create({}); | |
| // synonymous with new klass | |
| // calling class (without new) extends the given klass | |
| klass(Frog, {}); | |
| // => Frog (extended) |
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
| Error.prototype.stackTrace = function(){ | |
| var stack_trace = this.stack.split("\n").map(function(line){ | |
| if (!line) return line; | |
| line = line.match(/(.*?):(\d+)/); | |
| return { | |
| line: line[1], | |
| line_number: line[2] | |
| } | |
| }); | |
| stack_trace.pop(); |
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"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>KeepAlive</key> | |
| <true/> | |
| <key>Label</key> | |
| <string>org.openssh.dynamic-proxy</string> | |
| <key>LimitLoadToSessionType</key> | |
| <string>Aqua</string> |
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(){ | |
| var secret; | |
| function get(){ | |
| return secret; | |
| }; | |
| function set(value){ | |
| return secret = value; |
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
| // functions always run in the context of the object they are attached to | |
| // unless you use the apply or call methods | |
| function add_a_fish(){ | |
| this.fish = 'smelly'; | |
| } | |
| add_a_fish(); | |
| fish |
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
| <html> | |
| <head> | |
| <title>JavaScript Test</title> | |
| <script src="jquery.js" type="text/javascript"></script> | |
| <script type="text/javascript"> | |
| function init() { | |
| $.getJSON( | |
| "http://127.0.0.1:3000/", | |
| function(data) { | |
| alert('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
| <html> | |
| <head> | |
| <title>JavaScript Test</title> | |
| <script src="/test/jquery.js" type="text/javascript"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function(){ | |
| $.getJSON( | |
| "http://127.0.0.1:3000/", | |
| function(data) { | |
| alert('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
| <html> | |
| <head> | |
| <title>JavaScript Test</title> | |
| <script src="/test/jquery.js" type="text/javascript"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function(){ | |
| console.log("I'm JavaScript and I'm getting ready to fail but not let you know why."); | |
| $.getJSON( | |
| "http://127.0.0.1:3000/", | |
| function(data) { |