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
| "app".foo(); // Fail. The method `foo` doesn't exist | |
| require('commonjs_mod'); // Modifies the String native | |
| "app".foo(); // no Fail. The method `foo` was added |
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
| String.prototype.foo = function(){ return "foo'd"; }; | |
| var myString1 = require('footools').myString; | |
| var myString2 = "app"; | |
| myString1.foo(); // Fail? | |
| myString2.foo(); // no Fail |
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
| var myString1 = require('commonjs_mod').myString; | |
| var myString2 = "app"; | |
| myString1.foo(); // no Fail. This string is an instance of a String whose prototype has a `foo` method | |
| myString2.foo(); // Fail. This string is an instance of the global String native |
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
| require('footools').setup(Array, Boolean, Function, Number, RegExp, String); | |
| "bar".foo(); // no Fail |
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>author</key> | |
| <string>Thomas Aylott</string> | |
| <key>comment</key> | |
| <string>Thomas Aylott ㊷ subtleGradient.com</string> | |
| <key>name</key> | |
| <string>Brilliance Black (Inverted)</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
| #!/usr/bin/env bash | |
| # | |
| # toggle_app | |
| # Toggle the visibility of any app on Mac OS X | |
| # Use with Quicksilver or something to toggle with shortcut keys | |
| # | |
| # by: Thomas Aylott -- SubtleGradient.com | |
| # license: MIT | |
| # |
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
| // Using this HTML | |
| /* | |
| <div id=root> | |
| <b id=3 class="foo bar"> | |
| <b id=2 class=bar> | |
| <b id=1 class=foo></b> | |
| </b> | |
| </b> | |
| </div> | |
| */ |
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
| Object.fromQueryString = function(queryString){ | |
| queryString = String(queryString); | |
| if (!queryString) return {}; | |
| queryString = queryString.split('?'); | |
| if (queryString.length > 1) queryString = queryString.slice(1); | |
| queryString = queryString.join('?'); | |
| var object = {}; | |
| var vars = queryString.split('&'); | |
| if (vars.length) for (var i=0, this_var; this_var = vars[i]; i++){ | |
| this_var = this_var.split('='); |
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
| Array.prototype.apply = function(bind, args){ | |
| var array = new Array(this.length); | |
| for (var i=0; i < this.length; i++) { | |
| if ('call' in this[i] && typeof this[i].call == 'function'){ | |
| try { | |
| if (typeof this[i] == 'function') | |
| array[i] = this[i].apply(bind, args); | |
| else array[i] = this[i].call.apply(bind, args); | |
| continue; |
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
| /** | |
| * History.Routing | |
| * | |
| * @version 2.0 | |
| * | |
| * @license MIT License | |
| * @author Harald Kirschner <mail [at] digitarald.de> | |
| * @copyright 2008 Author | |
| */ |