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
| Verifying that +filippomangione is my blockchain ID. https://onename.com/filippomangione |
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 extend() { | |
| var args = Array.prototype.slice.call(arguments); | |
| for(var i=1; i<args.length; i++) { | |
| for(var key in args[i]) { | |
| if(args[i].hasOwnProperty(key)) { | |
| args[0][key] = args[i][key]; | |
| } | |
| } | |
| } | |
| return args[0]; |
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 openWindow(url, title, w, h) { | |
| // Fixes dual-screen position | |
| var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : screen.left; | |
| var dualScreenTop = window.screenTop != undefined ? window.screenTop : screen.top; | |
| width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width; | |
| height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height; | |
| var left = ((width / 2) - (w / 2)) + dualScreenLeft; | |
| var top = ((height / 2) - (h / 2)) + dualScreenTop; |
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 _ = require('./underscore.js'); | |
| /* | |
| * Append querystring to the url | |
| * @param string url | |
| * @param object parameters | |
| */ | |
| function qs(url, params){ | |
| if(params){ |
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
Show hidden characters
| { | |
| // -------------------------------------------------------------------- | |
| // JSHint Configuration, Strict Edition | |
| // -------------------------------------------------------------------- | |
| // | |
| // This is a options template for [JSHint][1], using [JSHint example][2] | |
| // and [Ory Band's example][3] as basis and setting config values to | |
| // be most strict: | |
| // | |
| // * set all enforcing options to true |
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 _ = require('./underscore.js'); | |
| function foo(l, target) { | |
| var off = target - _.reduce(l, function(acc, x) { return acc + Math.round(x) }, 0); | |
| return _.chain(l). | |
| sortBy(function(x) { return Math.round(x) - x }). | |
| map(function(x, i) { return Math.round(x) + (off > i) - (i >= (l.length + off)) }). | |
| 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
| (function($) { | |
| function startTrigger(e,data) { | |
| var $elem = $(this); | |
| $elem.data('mouseheld_timeout', setTimeout(function() { | |
| $elem.trigger('mouseheld'); | |
| }, e.data)); | |
| } | |
| function stopTrigger() { | |
| var $elem = $(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
| (function() { | |
| 'use strict'; | |
| var method; | |
| var noop = function () {}; | |
| var methods = [ | |
| 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', | |
| 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', | |
| 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', | |
| 'timeStamp', 'trace', 'warn' |
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 cbSucc(val) { | |
| console.log("Got my value! Yay!", val); | |
| } | |
| function cbErr(val) { | |
| console.log("D'oh!", val); | |
| } | |
| var defer = function () { | |
| var state = 'pending'; |
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 path = '/m/static/media/file-8861b49be6e21675f87b174cb824d79f.jpg'; | |
| var basename = path.split(/[\\/]/).pop(); |
NewerOlder