Skip to content

Instantly share code, notes, and snippets.

View justsml's full-sized avatar
🔥
#BLM

Dan Levy justsml

🔥
#BLM
View GitHub Profile

Speaker Rider

by Tatiana Mac

Before I'll agree to a speaking event, I try to do as much research I can around the event to ensure it aligns with my ethos. I want to share this in case it's helpful to any other speakers.

👐 Speaking comes with immense privilege. I am grateful to all the conference organisers who have brilliantly hosted me. I would love to continue to exercise this privilege to speak at conferences, and use this privilege to make the landscape more accessible and beneficial to tech's most marginalised and suppressed communities.

😫 I wish I didn't have to, but this is long because I provide a lot of explanations for those of you who never had to consider these things. And I will be honest, most thoughtful conferences I've attended check most of these boxes intrinsically, particularly when conference runners are experienced speakers. They get it.

1️⃣ All of these are based on my own ethos. I don't wish to or attempt to speak on behalf of all conference speake

const combiningMarks = /([\0-\u02FF\u0370-\u1AAF\u1B00-\u1DBF\u1E00-\u20CF\u2100-\uD7FF\uE000-\uFE1F\uFE30-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])([\u0300-\u036F\u1AB0-\u1AFF\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]+)/gmi;
/**
Remove unicode combining symbols.
Will convert the following string: Z͑ͫ̓ͪ̂ͫ̽͏̴̙̤̞͉͚̯̞̠͍A̴̵̜̰͔ͫ͗͢L̠ͨͧͩ͘G̴̻͈͍͔̹̑͗̎̅͛́Ǫ̵̹̻̝̳͂̌̌͘!͖̬̰̙̗̿̋ͥͥ̂ͣ̐́́͜͞
Into: ZALGǪ!
*/
export const removeCombiningMarks = (input) => {
return input.replace(combiningMarks, (substr, ...args) => {
@justsml
justsml / cloudflare-workers-signup-endpoint.js
Created February 23, 2020 23:58
Uses Cloudflare KV data store & Google ReCaptcha!
// Note to self: Currently running here: https://dash.cloudflare.com/eb29900091c43bef22edfb71df934698/workers/edit/fanclub
/*
## Utility Functions
*/
const isEmailShaped = email => email && email.length > 5 && email.indexOf('@') > -1
const sendJSON = (data, status = 200) => new Response(
typeof data !== 'string' ? JSON.stringify(data) : data, {
headers: { 'Content-Type': 'application/json; charset=UTF-8' },
@justsml
justsml / the-dumpster-fire-of-project-configuration-noise.md
Last active February 1, 2020 07:00
PSA: Modern project configuration files needlessly pollute root folders by default!
@justsml
justsml / mongodb-export-fixtures.sh
Created January 29, 2020 11:31
Export all collections in a mongo database to JSON files!
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
PARAMS=""
DB_HOST="localhost"
DB_PORT=27017
DB_DATABASE="local"
# DB_COLLECTION=""
/*
The number of stack frames that can
(reasonably) be tracked is small (~dozens).
When you run code like below, the inner async `writeFile`
can 'lose' its prior frame(s) 2 main ways:
1. When the outer `forEach` completes (w/ asyncs still running)
the stack pops off the completed synchronous frames into
the ether. Any later failure may only have a bit of async
@justsml
justsml / index.html
Last active October 7, 2019 08:17
User Interface I: Airport Starter File
<!--
Semantic Markup === Meaningful code
Some semantic markup examples:
<nav></nav>
<section></section>
<main></main>
<header></header>
#!/bin/bash
set -e
echo "> CURRENT DNS SERVERS:"
networksetup -getdnsservers Wi-Fi
networksetup -setdnsservers Wi-Fi \
9.9.9.9 1.1.1.1 8.8.8.8
# Quad 9 Cloudflare Google
echo "> DNS SERVERS UPDATED"
@justsml
justsml / promise-timeout.js
Last active January 1, 2019 02:02
adds tracking of the promise timeout via `__timeout` flag
function promiseTimeout(msec) {
return (promise) => {
let isDone = false
promise.then(() => isDone = true)
const timeout = new Promise((yea, nah) => setTimeout(() => {
if (!isDone) {
promise.__timeout = true
nah(new Error('Timeout expired'))
}
}, msec))