I hereby claim:
- I am dbrockman on github.
- I am dbrckmn (https://keybase.io/dbrckmn) on keybase.
- I have a public key whose fingerprint is 1D11 8D7A 9177 F946 DD3A C5A7 4EEA C966 0D82 F1EB
To claim this, I am signing this object:
| - (NSUInteger)countTilesInRegionSouthWest:(CLLocationCoordinate2D)southWest | |
| northEast:(CLLocationCoordinate2D)northEast | |
| minZoom:(int)minZoom | |
| maxZoom:(int)maxZoom | |
| { | |
| double minLat = southWest.latitude; | |
| double maxLat = northEast.latitude; | |
| double minLon = southWest.longitude; | |
| double maxLon = northEast.longitude; | |
I hereby claim:
To claim this, I am signing this object:
| ### ALIAS | |
| alias cd..='cd ..' | |
| alias ..='cd ..' | |
| alias ...='cd ../..' | |
| alias ....='cd ../../..' | |
| alias §='exit' | |
| # Get week number | |
| alias week='date +%V' |
| function modulo(a, b) { | |
| var r = a % b; | |
| return (r * b < 0) ? r + b : r; | |
| } | |
| function nthArrayItem(array, n) { | |
| return array[modulo(n, array.length)]; | |
| } |
| /** | |
| Axial coordinates | |
| # convert cube to axial | |
| q = x | |
| r = z | |
| # convert axial to cube | |
| x = q | |
| z = r |
| c_cyan=`tput setaf 6` | |
| c_red=`tput setaf 1` | |
| c_green=`tput setaf 2` | |
| c_sgr0=`tput sgr0` | |
| parse_git_status() { | |
| local color="" | |
| if git rev-parse --git-dir >/dev/null 2>&1 | |
| then |
| export default createFromSeed(randomSeed()); | |
| export function createFromSeed(seed) { | |
| if (!Number.isInteger(seed) || seed <= 0) { | |
| throw new TypeError('seed must be an int > 0'); | |
| } | |
| let value = seed; | |
| const next = () => { | |
| const hi = 16807 * (value >> 16); |
| // high-resolution time diff in milliseconds | |
| function hrmstime(t) { | |
| if (t) { | |
| t = process.hrtime(t); | |
| return (t[0] * 1e9 + t[1]) / 1e6; | |
| } | |
| return process.hrtime(); | |
| } | |
| // Takes a number and clamps it to within the provided bounds. | |
| #define Clamp(_num, _min, _max) MIN((_max), MAX((_min), (_num))) | |
| // Check if the two floats are equal. | |
| #define FloatEqual(A, B) (ABS((A) - (B)) < FLT_EPSILON) | |
| // Check if the two floats are NOT equal. | |
| #define FloatNotEqual(A, B) (ABS((A) - (B)) > FLT_EPSILON) | |
| // Check if the float is equal to zero. |
| // Fisher-Yates shuffle | |
| function shuffle(array) { | |
| for (var n = array.length, k, x; 1 < n;) { | |
| k = Math.floor(Math.random() * n--); | |
| x = array[n]; | |
| array[n] = array[k]; | |
| array[k] = x; | |
| } | |
| } |