Skip to content

Instantly share code, notes, and snippets.


Emelia Smith ThisIsMissEm

View GitHub Profile
ThisIsMissEm / gist:57e5a773a3758b7520b633e5700e288e
Created February 24, 2023 21:07
Namecheap doesn't provide a CSV of all their current prices, and when you download your domains list as CSV, they don't give you the price that domain will renew at. They do have a pricing table at which running the following snippet will produce a string of CSV data that is the current pricing informat…
View gist:57e5a773a3758b7520b633e5700e288e
const rows = document.querySelectorAll("#pricing tbody > tr");
let csv = "TLD,Register Price,Special Price,Renew Price,Special Renew Price\n";
for(let row of rows) {
let tld = row.querySelector(".gb-tld-name").innerText;
let newPrice = "",newPriceSpecial = "",renewPrice = "",renewPriceSpecial = "";
let $NewPrice = row.querySelector("td:nth-child(2) > span:not(.gb-price--sale)");
let $RenewPrice = row.querySelector("td:nth-child(3) > span:not(.gb-price--sale)");
if ($NewPrice) {
newPrice = $NewPrice.innerText.substr(1);
ThisIsMissEm / router.tsx
Last active December 4, 2020 14:14
How to use loadable component properly with react-router using full dynamic imports and correct typescript types.
View router.tsx
import loadable, { LoadableComponent } from '@loadable/component';
import { RouteComponentProps } from 'react-router-dom';
import { StaticContext } from 'react-router';
import { LocationState } from 'history';
// Autogenerated Types for the Capabilities and their Screens:
import { Capabilities, Screens } from './routeTypes';
export * from 'react-router-dom';
export function createScreen<
ThisIsMissEm / bootstrap.ts
Created September 27, 2020 22:51
entrypoint.js is the entrypoint for the CLI and lives in bin/ and is tied to a scripts entry. bootstrap.js figures out the conditions under which we are executing, and extracts the argv variables from the command run in the terminal, so you can pass them to your cli.js file.
View bootstrap.ts
import path from 'path';
const debug = require('debug')('cli:bootstrap');
npm_lifecycle_script: process.env.npm_lifecycle_script,
npm_config_argv: process.env.npm_config_argv,
npm_config_username: process.env.npm_config_username,
ThisIsMissEm /
Created August 19, 2020 22:16
Patch with test for git pre-push hook when remote is already up to date; No stdin lines are generated
diff --git a/t/ b/t/
index ac53d63869..edb619726e 100755
--- a/t/
+++ b/t/
@@ -19,14 +19,31 @@ test_expect_success 'setup' '
test_commit one &&
git push parent1 HEAD:foreign
+COMMIT1="$(git rev-parse HEAD)"
View How To Reply To Amazon

Yes, this is absolutely a spam email. Worse than that, you've failed to at all in anyway make this a personal outreach to a candidate.

Honestly, I've lost track of how many times I've declined Amazon already. You treat staff who are essential to your business like crap, have huge and unjustified pay disparities between your lowest paid and highest paid staff, invade peoples privacy & sell that data to police, have shitty management practices that undervalue minorities, and a crappy interviewing process.

Ask yourself: given all that, why would I ever want to work at Amazon?

You're like the Boomer of tech companies.

ThisIsMissEm / Post-checkout-hook.js
Last active October 2, 2020 16:57
The only post-checkout git hook I'll agree with
View Post-checkout-hook.js
#! /usr/bin/env node
* This file does not use typescript as it's run before you've necessarily run `yarn install`
* As such, we can only use built-in modules here.
function main() {
let [
// Arguments from the githook:
View post-checkout.js
#! /usr/bin/env node
* This file does not use typescript as it's run before you've necessarily run `yarn install`
* As such, we can only use built-in modules here.
function main() {
let [
// Arguments from the githook:
ThisIsMissEm / Schema.graphql
Created October 2, 2019 05:15
Form Validation as a Result Union
View Schema.graphql
mutation updateUser(
details: UpdateUserInput!
): UpdateUserResult
union UpdateUserResult =
UpdateUserSuccess |
type UpdateUserSuccess {}
View kafka.ts
import { Kafka, logLevel, KafkaConfig, SASLOptions } from "kafkajs";
const options: KafkaConfig = {
clientId: "my-client",
brokers: (process.env.KAFKA_BROKERS &&
process.env.KAFKA_BROKERS.split(",")) || ["localhost:9092"]
if (
View KafkaRPC.js
import { Kafka, Consumer, Producer, KafkaMessage } from "kafkajs";
import { Logger } from "pino";
import { EventEmitter } from "events";
import uuidv4 from "uuid/v4";
type Options = {
groupId: string;
topicPrefix: string;
logger: Logger;