Skip to content

Instantly share code, notes, and snippets.


Idan Gazit idan

View GitHub Profile
idan / router.ts
Last active May 20, 2023 18:00
basic router in typescript
View router.ts
export type Route = {
method: "*" | "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS" | "CONNECT" | "TRACE"
path: string
regexp: RegExp
handler: (request: Request, route: MatchedRoute) => Promise<Response>
export type MatchedRoute = Route & {
url: URL
idan /
Created March 21, 2022 06:36
Next Planning
idan / breeze.dtsi
Last active September 17, 2022 19:38
My ZMK Breeze Keymap
View breeze.dtsi
* Copyright (c) 2022 The ZMK Contributors
* SPDX-License-Identifier: MIT
#include <dt-bindings/zmk/matrix_transform.h>
/ {
chosen {
idan /
Created September 18, 2021 18:54
A fish function which deletes all branches not called main or master
function branchclean
# delete branches that are not called 'main' or 'master'
# Invoke with -r to also delete the branches on the origin remote
# WARNING — this doesn't check if the branches are merged.
argparse 'r/remote' -- $argv
for b in (git branch | grep -v "^\*\?\s\+\(master\|main\)\$" | string trim);
git branch --delete $b;
if test -n "$_flag_r"
git push -d origin $b
idan /
Last active May 4, 2021 15:53
Flat Writeup Draft

Wandering the halls of the Internet today, it's hard to miss a certain kind of discourse on data. Big data, bigger data, biggest data. A million rows aren't cool. You know what's cool? A billion rows. Distributed data systems that slip the surly bonds of any one machine. Techniques for sampling and transforming data while it moves. Strategies for contending with a deluge of events from chatty devices. Directing those data tributaries into undifferentiated data lakes so that we may pose different queries onto the data someday. It has become almost impossible to talk about this stuff without abusing metaphors way past their safe design limits.

As a developer, all those bits occupying the proverbial lake/warehouse/refinery are as immediately useful as a grape seed is to a winery. Locality of data isn't some abstract concept when you're trying to build things on top of that data — it's the leading term of developer experiences. If I have the data, I can load it, and get to work. If I don't have the data, then

View gitcsvtest.ts
import Fiona from "";
import { csvFormat, csvParse } from "";
const { writeTextFile, run, mkdir, stdout } = Deno;
const { now } = performance;
type Row = {
name: string;
date: Date;
bio: string;
p: number;
View helloargo.yml
kind: Workflow
generateName: artifact-passing-
entrypoint: artifact-example
- name: artifact-example
- - name: generate-artifact
idan / decaf_slack_theme.txt
Created April 23, 2020 15:55
Decaf Slack Theme
View decaf_slack_theme.txt
idan / Hospital Modeling
Created March 27, 2020 01:09
Data for Modeling COVID Things
View Hospital Modeling

Model and Underlying Data

Data about Hospitals

Total number of beds by state draws upon aggregates from this report from ESRI based on Definitive Healthcare.