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
from decimal import Decimal | |
for i in range(1, 1000000): | |
x = Decimal(i) | |
y = Decimal(i + 1) | |
z = x / y |
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
### Keybase proof | |
I hereby claim: | |
* I am xcoderzach on github. | |
* I am zachs (https://keybase.io/zachs) on keybase. | |
* I have a public key whose fingerprint is 8867 97BD B083 6399 3A27 10BF BC77 1768 26E3 1682 | |
To claim this, I am signing this object: |
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
### Keybase proof | |
I hereby claim: | |
* I am xcoderzach on github. | |
* I am zachs (https://keybase.io/zachs) on keybase. | |
* I have a public key whose fingerprint is F5FC 7CF2 538F FF50 DB0F D6CA 7166 7314 0CB9 EC15 | |
To claim this, I am signing this object: |
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
import _ from 'lodash' | |
function ooify(fn) { | |
return function() { | |
return fn.apply(this, [this].concat([].slice.call(arguments))) | |
} | |
} | |
var methods = _.zipObject(_.map(_.keys(_.prototype), methodName => { | |
return [methodName, ooify(_[methodName])] | |
})) |
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
window.oldWS = window.WebSocket | |
window.sockets = [] | |
window.WebSocket = function() { | |
var ws = oldWS.apply(this, arguments); | |
window.sockets.push(ws); | |
return ws; | |
} |
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 f(x) { | |
x = ((((x + 2) % 4) + 4) % 4) - 2 | |
if(x > 1) return 360 - Math.acos(2 - x) * (180/Math.PI) | |
if(x < -1) return 360 - Math.acos(-2 - x) * (180/Math.PI) | |
return Math.acos(x) * (180/Math.PI) | |
} |
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 exec = require('child_process').exec | |
var browsers = { chrome: 'Google\\ Chrome.app', firefox: 'Firefox.app', safari: 'Safari.app' } | |
function openInBrowser(browser) { | |
exec("open -a " + browsers[browser]) | |
} | |
openInBrowser('safari') |
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
while true | |
do | |
dig google.com | |
sleep 240 | |
done |
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 boundry = Physics.Boundry(0, 0, height, width) | |
var draggable = drag({ boundryDamping: .2 }).bounds(boundry) | |
var decelerate = phys.decelerate({ deceleration: 1000 }).bounds(boundry).start | |
var spring = phys.spring({ deceleration: 1000 }).start | |
draggable.pipe(phys) | |
draggable.start() | |
.then(decelerate) | |
.then(spring) |
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
document.addEventListener("deviceready", onDeviceReady, false); | |
function onDeviceReady(){ | |
console.log('onDeviceReady()'); | |
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, function() { console.log('FAIL - window.requestFileSystem'); } ); | |
} | |
// var mediaEncoded; | |
function gotFS (fileSystem) { | |
console.log("GotFS()"); |