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
| let hash = (o) => { | |
| return padLeft(uneval(o) | |
| .split('') | |
| .map((c) => c.charCodeAt(0)) | |
| .reduce((x,y) => { | |
| let v = ((y<<5)-y)+x; | |
| return modPow(0xBCD1B799D, v && v, 0x7FFFFFFF); | |
| }) | |
| .toString(16) | |
| .toUpperCase(),'0',9); |
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
| let uneval = (o, noNativeFns = true) => { | |
| var retVal = ''; | |
| if (typeof o === 'object') { | |
| if (Array.isArray(o)) { | |
| retVal = '[' + o.map((el) => uneval(el)).join(',') + ']'; | |
| } else if (o instanceof RegExp) { | |
| retVal = o.toString(); | |
| } else if (o instanceof Date) { | |
| retVal = `new Date(${o})`; | |
| } else if (o === null) { |
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
| let Uuid = () => { | |
| let r = (s) => { | |
| let p = (Math.random().toString(16)+"000000000").substr(2,8); | |
| return s ? "-" + p.substr(0,4) + "-" + p.substr(4,4) : p; | |
| }; | |
| return r() + r(1) + r(1) + r(); | |
| }; |
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
| let spawn = (...args) => { | |
| var src = args.map(function (x) { | |
| return typeof x === 'function' ? '((' + x.toString() + ').call(this));' : x; | |
| }).join(';'); | |
| return new Worker( | |
| window.URL.createObjectURL( | |
| new Blob([src]) | |
| ) | |
| ); |
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
| let modPow = (b, e, m, value = 1) => { | |
| b = b % m; | |
| if (e % 2 === 1) { | |
| value = (value * b) % m; | |
| } | |
| return e <= 1 ? value : modPow(b * b, e >> 1, m, 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
| let padLeft = (value, char, n) => n - value.length > 0 ? padLeft(char + value, char, n-1) : value; | |
| let padRight = (value, char, n) => n - value.length > 0 ? padRight(value + char, char, n-1) : 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
| Ext.define('Ext.util.WeakHashMap', { | |
| mixins: { | |
| observable: 'Ext.util.Observable' | |
| }, | |
| generation: 0, | |
| /** | |
| * Creates new HashMap. |
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
| //Dependency: https://gist.github.com/MattiasFestin/e5e92d5ae5e2b4bf89c3 | |
| Ext.override('Ext.AbstractManager', { | |
| constructor: function(config) { | |
| Ext.apply(this, config || {}); | |
| /** | |
| * @property {Ext.util.HashMap} all | |
| * Contains all of the items currently managed | |
| */ | |
| if (typeof window.WeakMap === '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
| ░░█▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ | |
| ██▀▀▀██▀▀▀▀▀▀██▀▀▀██ | |
| █▒▒▒▒▒█▒▀▀▀▀▒█▒▒▒▒▒█ | |
| █▒▒▒▒▒█▒████▒█▒▒▒▒▒█ | |
| ██▄▄▄██▄▄▄▄▄▄██▄▄▄██ | |
| █ ██ ██▀███ ▒█████ ▄████▄ ██ ▄█▀ ▐██▌ | |
| ██ ▓██▒ ▓██ ▒ ██▒▒██▒ ██▒▒██▀ ▀█ ██▄█▒ ▐██▌ | |
| ▓██ ▒██░ ▓██ ░▄█ ▒▒██░ ██▒▒▓█ ▄ ▓███▄░ ▐██▌ |
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
| Add-Type -AssemblyName System.Speech; $ss = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer; $ss.Speak('Do you want some up dog?'); $ss.SelectVoice('Microsoft Zira Desktop') ; $ss.Speak('What is up dog?'); $ss.SelectVoice('Microsoft David Desktop'); $ss.Speak('Nothing much, how about you'); $ss.SelectVoice('Microsoft Zira Desktop') ; $ss.Speak('Fuck you Dave!'); |
OlderNewer