Save bookmarklet.js
as a bookmarklet and on any Felt map the currently rendered features will be saved as a file features.geojson
(note: some features do not render at low zoom levels)
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 | |
TIMEFORMAT='Elapsed Time: %0R seconds.' | |
time { | |
export YEAR=`date '+%Y'` | |
export MONTH=`date '+%m'` | |
export DAY=`date '+%d'` | |
export WEEK=`date '+%U'` | |
# kill `cat /home/max/tweet/recording.pid` | |
for f in `ls /home/max/tweet/samples/${YEAR}/${MONTH}/${DAY}/*.wav` | |
do |
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
<html> | |
<head> | |
<meta | |
name="viewport" | |
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui" | |
/> | |
<link | |
rel="stylesheet" | |
href="https://unpkg.com/[email protected]/dist/leaflet.css" | |
crossorigin="" |
i downloaded the metro micro APK, extracted it, and then unminified the ionic JS source code, then reverse engineered these calls using my own username/password
# get a token
curl -H "Accept: application/json; version=rccmtp-2.18.0" -X POST https://api.metro-micro.net/api-token-auth/ -F "username=youremail" -F "password=yourpass"
# get geocode results
curl -H "Accept: application/json; version=rccmtp-2.18.0" -X GET "https://api.metro-micro.net/rest/geo/places/autocomplete/?value=yourtexttogeocode&session_token=$MICRO" -H "Authorization: Token $MICRO"
# get a trip/ride id
- Grab the latest bitcoin-core .tar.gz release and unpack it https://bitcoin.org/en/download
- Add the
bin
folder to your path - Start the regtest server
bitcoind -regtest
- Create a test wallet
bitcoin-cli -regtest createwallet test
- Get a bcrt address for your wallet
bitcoin-cli -regtest getnewaddress
- 'Mine' some regtest btc
bitcoin-cli generatetoaddress 10 <address-from-previous-command>
- Make sure it worked `bitcoin-cli getblockcount
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 https://github.com/blockstack/blockstack-core/blob/ff86948ed2f720824cd5e6ece6a63aaaf2bf81ff/blockstack/lib/b40.py | |
class B40 { | |
constructor() { | |
this.B16_CHARS = '0123456789abcdef' | |
this.B40_CHARS = '0123456789abcdefghijklmnopqrstuvwxyz-_.+' | |
} | |
divmod(x, y) { | |
const div = x / y | |
const rem = x % y |
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
#!/home/max/.nvm/versions/node/v0.12.18/bin/node | |
var fs = require('fs'); | |
var Speaker = require('speaker'); // version 0.3.0 | |
var OpenJTalk = require('node-openjtalk').OpenJTalk; | |
console.log(process.argv[2]) | |
// pre-included HTS voice file | |
var fn_voice = OpenJTalk.voices.mei_normal; | |
// instantiate OpenJTalk with an HTS voice | |
var open_jtalk = new OpenJTalk({voice: fn_voice}); | |
// synthesize a voice synchronously |
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
#!/usr/bin/env bash | |
# chmod +x this and save in your PATH. Assumes `eslint` + `prettier` are in your `devDependencies` | |
BRANCH=$(git branch | grep \* | cut -d ' ' -f2) | |
BASE=$(git merge-base master $BRANCH) # change master to whatever your trunk branch is | |
COMMITED=$(git diff --name-only $BASE $BRANCH) | |
STAGED=$(git diff --staged --name-only) | |
FILES=$(printf "$COMMITED\n$STAGED" | sort | uniq) | |
LINT="npx eslint --ignore-path=.prettierignore $FILES" | |
PRETTIER="npx prettier --list-different $FILES" |
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
const bip39 = require('bip39') | |
function twelveWords (missing) { | |
return `fold supreme boat absurd mango menu number brick ${missing} sun gold stone` | |
} | |
function loadWords () { | |
return `abandon | |
ability | |
able |
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 { composePrivateKey, composePublicKey } from 'crypto-key-composer' | |
function privateToPem(privateKey) { | |
var decomposed = { | |
format: 'pkcs8-pem', | |
keyAlgorithm: { id: 'ed25519' }, | |
keyData: { | |
seed: privateKey, | |
}, | |
} |
NewerOlder