git clone [email protected]:8aa43ff2c0f6e2632b204b0988fd2417.git
Start via deno task start
main.js
builds and runs a dev server index.tsx
is client entry point
/** | |
* All of these regions should have a `.poly` and a `-latest.osm.pbf` file | |
* associated to them. | |
*/ | |
import * as cheerio from "npm:cheerio" | |
const baseURL = "https://download.geofabrik.de/" | |
const regions = new Set() | |
// antarctica has no children, so not in baseRegions, but add to regions |
/** | |
* @description | |
* This is a modified version of parse-dictd to be used with Deno, using only | |
* std dependencies. | |
* | |
* @reference https://github.com/nvdnkpr/parse-dictd | |
*/ | |
import { TextLineStream } from "jsr:@std/streams/text-line-stream"; | |
import { toTransformStream } from "jsr:@std/streams/to-transform-stream"; |
/** | |
* @description | |
* This is a simplified version of cedict2json.js by Kevin Yang, modified to be | |
* run with deno, only using std dependencies. | |
* | |
* @reference https://github.com/kevb34ns/CEDICT2JSON/blob/master/cedict2json.js | |
* @reference https://www.mdbg.net/chinese/dictionary?page=cc-cedict | |
* | |
* CC-CEDICT is licensed under the Creative Commons Attribution-Share | |
* Alike 3.0 License (https://creativecommons.org/licenses/by-sa/3.0/). |
// 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 [email protected]: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/[email protected]/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