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
| /* global global: true */ | |
| function Constructor () { | |
| this.instanceMethod(); | |
| Constructor.staticMethod(); | |
| function privateFunction () { | |
| global.console.log('Hello, I am an internal function! XD'); | |
| } | |
| } |
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/local/bin/pip run on Mon Dec 1 09:37:52 2014 | |
| Downloading/unpacking tamper | |
| Getting page https://pypi.python.org/simple/tamper/ | |
| URLs to search for versions for tamper: | |
| * https://pypi.python.org/simple/tamper/ | |
| Analyzing links from page https://pypi.python.org/simple/tamper/ | |
| Skipping link https://pypi.python.org/packages/any/t/tamper/tamper-0.10.macosx-10.9-intel.exe#md5=536fad086837b19def97f5a97b2f64cb (from https://pypi.python.org/simple/tamper/); unknown archive format: .exe | |
| Skipping link https://pypi.python.org/packages/any/t/tamper/tamper-0.11.macosx-10.9-intel.exe#md5=19d1c8f8f5c34d372b61ba7a570dfa19 (from https://pypi.python.org/simple/tamper/); unknown archive format: .exe | |
| Skipping link https://pypi.python.org/packages/any/t/tamper/tamper-0.12.macosx-10.9-intel.exe#md5=b38c08843afbde2b7f8aaa7946060db0 (from https://pypi.python.org/simple/tamper/); unknown archive format: .exe |
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
| // #protip: Save this as a Chrome Devtools snippet! | |
| // http://www.briangrinstead.com/blog/devtools-snippets | |
| Object.keys(window.localStorage).forEach(function (key) { | |
| console.log(key, JSON.parse(window.localStorage[key])); | |
| }); |
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 tween = new Tweenable({}, { | |
| from: { x: 0 }, | |
| to: { x: 10 }, | |
| duration: 1000, | |
| step: function (state) { | |
| console.log(state); | |
| } | |
| }); | |
| tween.seek(50); |
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 downloadTextAsFile(text, fileName) { | |
| var a = document.createElement('a'); | |
| var url = window.URL.createObjectURL(new Blob([text], { type: 'text/plain' })); | |
| a.href = url; | |
| a.download = fileName || 'file.txt'; | |
| a.click(); | |
| window.URL.revokeObjectURL(url); | |
| } |
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 mergeObjects (target, source) { | |
| var prop; | |
| for (prop in source) { | |
| if (source.hasOwnProperty(prop)) { | |
| if (_.isObject(target[prop]) && _.isObject(source[prop])) { | |
| mergeObjects(target[prop], source[prop]); | |
| } else { | |
| target[prop] = source[prop]; | |
| } |
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 () { | |
| // Strict mode is not necessary here, it's just used to demonstrate that this works. | |
| 'use strict'; | |
| return (new Function ('return this'))(); | |
| })(); |
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
| { | |
| "paths": { | |
| "text": "path/to/text", | |
| "underscore": "empty:", | |
| "extra-module": "empty:", | |
| "main-module": "main" | |
| }, | |
| "baseUrl": "./", | |
| "out": "out.js", | |
| "optimize": "uglify", |
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 backcoloractortxt = rekapi.addActor( | |
| new Rekapi.Actor({ | |
| 'render': function (context, state) { | |
| context.beginPath(); | |
| var titleheight = 40; | |
| context.font = titleheight*state.scale+"px Arial"; | |
| context.measureText("Bardon Update").width; | |
| var w = context.measureText("HomePrezzo").width; | |
| context.font = (titleheight/2)*state.scale+"px Arial"; | |
| var w2 = context.measureText("Bardon Update").width; |
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
| <!DOCTYPE html> | |
| <html> | |
| <script src="shifty.js"></script> | |
| <script src="date.js"></script> | |
| <script> | |
| var tweenable = new Tweenable(); | |
| tweenable.tween({ | |
| from: { 'x': 0 }, |