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
### Keybase proof | |
I hereby claim: | |
* I am aeharding on github. | |
* I am aeharding (https://keybase.io/aeharding) on keybase. | |
* I have a public key ASDOKM8xvgBnV6F7H4iKDpa7qSkh7u4J19x7kc4LbFPB8Ao | |
To claim this, I am signing this object: |
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
#!/bin/bash | |
# Navigate to the core directory | |
cd core || exit | |
# Fetch upstream changes and checkout the latest release | |
git fetch upstream | |
git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) | |
# Delete the existing "tweak" branch if it exists |
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
import { UseIonRouterResult, useIonRouter } from "@ionic/react"; | |
import { | |
MutableRefObject, | |
ReactNode, | |
createContext, | |
useContext, | |
useEffect, | |
useMemo, | |
useRef, | |
} from "react"; |
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
// IF YOU ARE AN APPLE ENGINEER READING THIS: | |
// | |
// PLEASE put the "Add to Home Screen" option inside the share menu of | |
// SFSafariViewController like it is in the Safari app! | |
// | |
// The code below is needed in order to differentiate to | |
// provide user messaging because of this difference. | |
// | |
// If the "Add to Home Screen" button was available in both | |
// SFSafariViewController + Safari, I wouldn't need this hack. |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//cdn.jsdelivr.net/pouchdb/6.0.7/pouchdb.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore.js"></script> | |
</head> | |
<body> | |
<button onclick="seed()">Seed the database with 10000 docs</button><br> | |
<button onclick="recreate()">Destroy and recreate database</button><br> | |
<button onclick="verifyDocs()">Verify 10000 docs exist</button><br> |
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
// Generates a cryptographically secure number [0-1) | |
// as an alternative to Math.random() | |
// | |
// source: http://stackoverflow.com/a/13694869/1319878 | |
function secureRandom() { | |
var arr = new Uint32Array(2); | |
crypto.getRandomValues(arr); | |
// keep all 32 bits of the the first, top 20 of the second for 52 random bits | |
var mantissa = (arr[0] * Math.pow(2,20)) + (arr[1] >>> 12) |
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
# Only works with positive numbers #dealwithit | |
timeoutSort = (arr, cb) -> | |
ret = [] | |
longest = 0 | |
for t in arr then do -> | |
longest = t if t > longest | |
tmp = t | |
setTimeout -> | |
ret.push tmp | |
, t |
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
class LinkedList | |
isEmpty: -> | |
not @head? | |
prepend: (item) -> | |
node = new Node item, @head | |
@tail = node if @isEmpty() | |
@head = node | |
append: (item) -> |
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
diagDir = false | |
x = 5 | |
y = 9 | |
console.clear() | |
# Initialize that shizzle | |
grid = [] | |
for i in [0...10] | |
grid.push [] |