Skip to content

Instantly share code, notes, and snippets.

View forivall's full-sized avatar
🕴️
levitating

Emily Marigold Klassen forivall

🕴️
levitating
View GitHub Profile
@rndD
rndD / sendgrid-webhook-events.type.ts
Last active February 5, 2024 11:18
Sendgrid webhook events ts type
// @see https://docs.sendgrid.com/for-developers/tracking-events/event
// There are is a mistake in the offical doc. Category is array of strings. I took it from the real webhook call.
type BaseSendgridEvent = {
email: string;
timestamp: number;
'smtp-id': string;
category: string | string[];
sg_event_id: string;
sg_message_id: string;
@Gabriella439
Gabriella439 / trans.md
Last active November 28, 2023 06:30
I'm trans

I'm writing this post to publicly come out as trans (specifically: I wish to transition to become a woman).

This post won't be as polished or edited as my usual posts, because that's kind of the point: I'm tired of having to edit myself to make myself acceptable to others.

I'm a bit scared to let people know that I'm trans, especially because I'm not yet in a position where I can transition (for reasons I don't want to share, at least not in public) and it's really shameful. However, I'm getting really

@remi
remi / shc.js
Last active March 2, 2022 14:32
Extract JSON object from https://smarthealth.cards QR code
// Extract JSON payload from SHC QR code (without any kind of private/public key verification)
// Credits + inspiration
// https://github.com/dvci/health-cards-walkthrough/blob/main/SMART%20Health%20Cards.ipynb
// Usage
// $ node shc.js "shc:/01234569…"
const zlib = require("zlib");
//
// coredock.h
// Header file for undocumented Dock SPI
//
// Arranged by Wolfgang Baird
// Based on CoreDockPrivate.h from http://www.cocoadev.com/index.pl?DockPrefsPrivate
//
// Contributors:
// Alacatia Labs: Initial version posted at http://www.cocoadev.com/index.pl?DockPrefsPrivate
// Tony Arnold: CoreDockGetWorkspacesEnabled, CoreDockSetWorkspacesEnabled, CoreDockSetWorkspacesCount
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
type ValueOf<T> = T[keyof T];
export const literalToEnum = <Enum extends Record<string, string | number>>(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
enumButJustForTyping: Enum
) => <Candidate extends EnumLiteralType<Enum>>(v: Candidate) =>
(v as string) as LiteralToEnum<Enum, Candidate>;
export type LiteralToEnum<
Enum extends Record<string, string | number>,
@lambda-mike
lambda-mike / kakoune_cheatsheet.md
Last active July 11, 2023 23:49
My Kakoune cheatsheet

Kakoune

set verbose mode (good for learning) :set -add global autoinfo normal

Movement

Goto

10g - go to line 10

@lexrus
lexrus / ToggleHDRCatalina.applescript
Created March 26, 2020 02:26
Workaround the HDR bug of macOS Catalina 10.15.4
tell application "System Preferences"
activate
end tell
tell application "System Events"
tell process "System Preferences"
activate
delay 1
click menu item "Displays" of menu "View" of menu bar 1
delay 1
@smashercosmo
smashercosmo / generate.js
Created May 22, 2019 12:45
Generate fake data out of TypeScript types
const execa = require('execa')
const jsf = require('json-schema-faker')
;(async () => {
const { stdout } = await execa(
'./node_modules/.bin/ts-json-schema-generator',
[
'--path',
'./organizations.ts',
'--type',
@WebInspectInc
WebInspectInc / sublime-merge-commands.md
Last active December 24, 2023 06:29
Sublime Merge Commands

Sublime Merge Commands

Lots of commands available for keybindings in Sublime Merge. Not a comprehensive list, but a decent start.

  • exit_blame
  • exit_tree_mode
  • toggle_search
  • hide_command_status
  • hide_overlay