This file contains 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
//Based on the fast inverse square root function | |
// https://en.wikipedia.org/wiki/Fast_inverse_square_root | |
// Some original comments preserved for humor value | |
// Designed to try to mimic the original as closely as possible | |
function Q_rsqrt(number) | |
{ | |
var i; | |
var x2, y; | |
const threehalfs = 1.5; | |
This file contains 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
license: MIT | |
height: 770 |
This file contains 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
/** | |
* Created by syzer on 12/19/2014. | |
* ex shows how to decouple constant error checking from function/class body | |
* AKA TypeScript AKA WarnScript :) | |
*/ | |
var _ = require('lodash'); | |
function doStuffNumberPlusOneTimes(number, fun) { | |
"use strict"; |
This file contains 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
// task #function composiotion | |
var articles = [ | |
{ | |
title: 'Why OO Sucks by Joe Armstrong', | |
url: 'http://www.bluetail.com/~joe/vol1/v1_oo.html', | |
author: { | |
name: 'Joe Armstrong', | |
email: 'empty@email.com' | |
} | |
}, |
This file contains 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
{ | |
"result": "SUCCESS", | |
"interfaceVersion": "1.0.3", | |
"requested": "10/17/2013 15:31:20", | |
"lastUpdated": "10/16/2013 10:52:39", | |
"tasks": [ | |
{ | |
"id": 104, | |
"complete": false, | |
"priority": "high", |
This file contains 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
# post_loc.txt contains the json you want to post | |
# -p means to POST it | |
# -H adds an Auth header (could be Basic or Token) | |
# -T sets the Content-Type | |
# -c is concurrent clients | |
# -n is the number of requests to run in the test | |
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/ |
This file contains 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
# Step 1: Set priveleges | |
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all | |
Starting... | |
Setting allow all users to YES. | |
Setting all users privileges to 1073742079. | |
Done. | |
# Step 2: Allow VNC clients |
This file contains 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
for (var i = 0; i < 1024 * 1024; i++) { | |
process.nextTick(function () { Math.sqrt(i) } ) | |
} |
NewerOlder