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 Foo = 'bar'; |
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 osascript | |
| -- Refreshes the CSS in every Safari document | |
| -- Using the bookmarklet found at http://dojotoolkit.org/~david/recss.html | |
| -- | |
| -- Converted to Applescript by Thomas Aylott - http://subtleGradient.com | |
| tell app "Safari"¬ | |
| to do JavaScript "!function(){ var links = document.getElementsByTagName('link'); for (var i=0, link; link = links[i++];){ if (link.href && String(link.rel).toLowerCase().indexOf('stylesheet') >= 0){ var href = link.href.replace(/[&?]reCSS=\\d+/, ''); link.href = href + (href.indexOf('?') >= 0 ? '&' : '?') + 'reCSS=' + (+new Date); } } }()"¬ | |
| in every document |
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 Events(exports){ | |
| var events = {} | |
| exports.fireEvent = function(){...} | |
| exports.addEvent = function(){...} | |
| // etc... | |
| return exports | |
| } |
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 MyClass(){ | |
| if (this instanceof MyClass){ | |
| this.init.apply(this, arguments); | |
| } else { | |
| MyClass.from(arguments[0]) | |
| } | |
| } | |
| MyClass.from = function(object){ | |
| // convert object into a MyClass or something |
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 Earth(){ | |
| var FootBall = new Game('the one you play with your feet with all the running and stuff'); | |
| var Canada | |
| (function USA(soccer){ | |
| var FootBall = new Game('the one you play with your hands with all the padding and stuff'); | |
| Canada = this; | |
| }(FootBall)); |
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({ | |
| paths: { | |
| 'CoreTest': '../core/Specs/2.0', | |
| 'Core': '../core/Source', | |
| 'DOM': '../core/Source/DOM', | |
| 'More': '../more/Source', | |
| 'ART': '../art/Source', | |
| 'Slick': '../Slick/Source' | |
| }, | |
| ready: function(){ |
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
| if (typeof Object.getPrototypeOf != "function")(function(){ | |
| Object.getPrototypeOf = | |
| (typeof "".__proto__ == "object") | |
| ? function(object){ | |
| return getPrototypeValue(object, '__proto__'); | |
| } | |
| : function(object){ | |
| return getPrototypeValue(object, 'constructor').prototype; |
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
| #!/bin/bash | |
| if [ "$1" = "-h" -o "$1" = "--help" ]; then cat <<EOF | |
| appify v3.0.0 for Mac OS X - http://mths.be/appify | |
| Creates the simplest possible Mac app from a shell script. | |
| Appify takes a shell script as its first argument: | |
| `basename "$0"` my-script.sh |
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
| Ext.define('Ext.SomeThing', { | |
| config: { | |
| foo: { | |
| height: 123, | |
| baz: { | |
| something: 'zzz' | |
| } | |
| }, | |
| bar: { |
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
| /* | |
| * Write the body of the sortByFoo function below. | |
| * Executing the code must display no warnings in your browser's console. | |
| * i.e. all the assertions must pass | |
| */ | |
| function sortByFoo(array){ | |
| // TODO: Write code here. Use Array.sort. | |
| return array; | |
| } |