git clone git@gist.github.com:8aa43ff2c0f6e2632b204b0988fd2417.git
Start via deno task start
main.js
builds and runs a dev server index.tsx
is client entry point
// Google maps does already export to geo-json, but that doesn't take lists | |
// into account. This script maps the `Saved` csv files, maps data to | |
// `Maps (your places)`, and outputs a set of geojson files for each list. | |
// Requirements: | |
// - All locations must be "starred". This puts it in the "Saved Places.json". | |
//. - Notes can be in a list location. | |
// - Lists must NOT HAVE a "List description". It fucks up the csv parsing. | |
// Once you verify this, create a Google takeout that includes: |
git clone git@gist.github.com:8aa43ff2c0f6e2632b204b0988fd2417.git
Start via deno task start
main.js
builds and runs a dev server index.tsx
is client entry point
const weather_to_drink_temp_map = { | |
'0': "正常冰", | |
'1': "正常冰", | |
'2': "少冰", | |
'3': "少冰", | |
'71': "熱", | |
'73': "熱", | |
'75': "熱", | |
'77': "熱", | |
'95': "熱", |
import titleCase from "https://deno.land/x/case@2.1.1/titleCase.ts"; | |
const [dir, postDir] = Deno.args; | |
const contents = []; | |
for await (const file of Deno.readDir(dir)) { | |
if (file.name[0] === ".") continue; | |
contents.push(file); | |
} |
The simplest Typescript + React app I could come up with. Uses Deno because the runtime has out-of-the-box support for Typescript and TSX.
You need to install Deno to run this app: https://deno.land#installation
// Builds obj from unicode emoji-test text | |
// https://unicode.org/Public/emoji/14.0/emoji-test.txt | |
// http://www.unicode.org/reports/tr51/ | |
// Usage: | |
// deno run --allow-net fetch-emoji.ts | |
type Qualification = "fully-qualified" | "minimally-qualified" | "unqualified"; | |
interface EmojiObj { |
A small script I used to bruteforce my ethereum password for a really old wallet from list of possible passphrase combinations. It did the job at that time (phew)! Originally built in node.js, I rejiggered to be a deno app so I wouldn't need to push package.json, and to make importing json files look cleaner. Replace example json files with actual files to use.
keystore.json
is the wallet keystore
A basic file server, adapted from
https://deno.land/std@0.125.0/http/file_server.ts The only difference is this
one attempts to serve .html
if there is no file extension.
Can install same as deno file_server. I like to rename to be serve
:
deno install -f --allow-net --allow-read --name=serve https://gist.githubusercontent.com/ivebencrazy/de2f30bda961aeac9444de5345f68db4/raw/ff486c1206b1ee3f92514c2f8a578a8e7bbc6b45/file_server.ts
// Deno version of Wordle | |
// Loosely inspired by https://gist.github.com/huytd/6a1a6a7b34a0d0abcac00b47e3d01513 | |
// | |
// Run this script: deno run --allow-read wordle.ts | |
// Install this script: deno install --name=wordle --allow-read https://gist.githubusercontent.com/ivebencrazy/ac3c700f7d7800113c0d5d5251b0bdd8/raw/3cbf169aa7b5e59f6da033b53775085fe5d863ee/wordle.ts | |
import { | |
bgGreen, | |
bgWhite, | |
bgYellow, |
# https://johnnydecimal.com/ | |
cjd() { | |
if [ $# -eq 0 ]; then | |
cd ~/Documents | |
elif [ $1 =~ ['.'] ]; then | |
cd ~/Documents/*/*/${1}*/ | |
elif [ $1 =~ ['-'] ]; then | |
cd ~/Documents/${1}*/ | |
else | |
cd ~/Documents/*/${1}*/ |