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 -l | |
| die () { | |
| echo "[ERROR] $@" 1>&2 | |
| exit 1 | |
| } | |
| GIT_SRC="$HOME/Projects/Sencha/SDK" | |
| GIT_ROOT="$GIT_SRC-copy" | |
| SVN_REPO="$HOME/Projects/Sencha/sdk-svn-repo" | |
| if [[ ! -d "$SVN_REPO" ]]; then |
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
| exports.constructor = function(){} | |
| exports.constructor.prototype = exports | |
| exports.create = function(){ | |
| return this.constructor.apply(Object.create(this), arguments) | |
| } | |
| exports.property = 'foo' |
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 loadAsyncScript(URL) { | |
| var script = document.createElement('script'), | |
| firstScript = document.getElementsByTagName('script')[0]; | |
| script.async = 1; | |
| script.src = URL; | |
| firstScript.parentNode.insertBefore(script, firstScript); | |
| } | |
| loadAsyncScript('ext.js'); |
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; | |
| } |
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
| #!/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
| 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
| 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
| (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
| 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 |