I hereby claim:
- I am jrc03c on github.
- I am jrc03c (https://keybase.io/jrc03c) on keybase.
- I have a public key whose fingerprint is 1033 6973 7373 5FD5 7AE9 5114 ED23 C1F4 B19A C886
To claim this, I am signing this object:
| const fs = require("fs") | |
| const readline = require("readline") | |
| !(async () => { | |
| const stream = fs.createReadStream("path/to/file") | |
| const rl = readline.createInterface({ | |
| input: stream, | |
| crlfDelay: Infinity, | |
| }) | 
| # 8" x 4.5" | |
| plot.rcParams["figure.figsize"] = 8, 4.5 | 
| function deepSort(x, fn) { | |
| fn = fn || ((a, b) => (a < b ? -1 : 1)) | |
| if (typeof x === "object") { | |
| if (x === null) return x | |
| if (x instanceof Array) { | |
| return x.map(v => deepSort(v, fn)).sort(fn) | |
| } | |
| const ABOVE = "above" | |
| const BELOW = "below" | |
| const EXACTLY_ON = "exactly_on" | |
| function getPointRelationToLine(point, pair) { | |
| const [p1, p2] = pair | |
| // if the pair have the same x-values, then they either lie on a | |
| // vertical line or are identical | |
| if (p2[0] - p1[0] === 0) { | 
| import { watch } from "@jrc03c/watch" | |
| import process from "node:process" | |
| function rebuild() { | |
| console.log("-----") | |
| console.log(`Rebuilding... (${new Date().toLocaleString()})`) | |
| try { | |
| // do stuff... | |
| console.log("Done! 🎉") | 
| const express = require("express") | |
| const fs = require("fs") | |
| const http = require("http") | |
| const https = require("https") | |
| // create a basic HTTP app that just redirects requests from HTTP to HTTPS | |
| const httpApp = express() | |
| httpApp.use((request, response) => { | |
| return response.redirect("https://" + request.hostname + request.url) | 
| // Note that this uses the __dirname definition from here: | |
| // https://gist.github.com/jrc03c/6fbccd5af3a4d1b61f12e1e620e1c01b | |
| import { defineConfig } from "vite" | |
| import path from "path" | |
| const __dirname = path.resolve( | |
| import.meta.url.replace("file://", "").split("/").slice(0, -1).join("/") | |
| ) | 
| const __dirname = path.resolve( | |
| import.meta.url.replace("file://", "").split("/").slice(0, -1).join("/") | |
| ) | 
I hereby claim:
To claim this, I am signing this object:
| # from: https://stackoverflow.com/a/4630407 | |
| rsync -rvz -e "ssh -p <PORT>" --progress /source/path user@host:/target/path |