Skip to content

Instantly share code, notes, and snippets.

function Input<T>({
value,
onChange,
children,
serialize,
deserialize
}: {
value: T;
deserialize: (value: T) => string | null;
serialize: (rawValue: string | null) => T;
@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API
@pstadler
pstadler / browsers.json
Last active May 3, 2019 09:10
./selenoid.sh start|stop|restart
{
"chrome": {
"default": "65.0",
"versions": {
"65.0": {
"image": "selenoid/vnc:chrome_65.0",
"port": "4444"
}
}
},
@enricofoltran
enricofoltran / main.go
Last active April 1, 2024 00:17
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@veuncent
veuncent / aws_glacier_delete_vault.md
Last active March 19, 2024 18:16
Delete all archives in an AWS Vault

AWS Glacier: Delete vault

Follow these steps to remove all archives from an AWS vault. After this is finished, you will be able to delete the vault itself through the browser console.

Step 1 / Retrieve inventory

This will create a job that collects required information about the vault.

$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --account-id YOUR_ACCOUNT_ID --region YOUR_REGION --vault-name YOUR_VAULT_NAME 
@samber
samber / ejabberd-exporter.sh
Last active October 21, 2020 00:29
Ejabberd Prometheus exporter
#!/bin/bash
NAMESPACE="ejabberd"
EJABBERD_CLI="docker exec -i ejabberd-1 ejabberdctl"
function gauge() {
metric_name=$NAMESPACE"_"$1
help_message=$2
value=$3
@harlow
harlow / golang_job_queue.md
Last active April 24, 2024 10:21
Job queues in Golang
@morganrallen
morganrallen / _README.md
Last active January 15, 2023 19:41
Janky Browser

JankyBrowser

The only cross-platform browser that fits in a Gist!

One line install. Works on Linux, MacOSX and Windows.

Local Install

$&gt; npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
@tkafka
tkafka / LICENSE.txt
Last active September 5, 2019 13:38
Drop-in replacement for ReactCSSTransitionGroup that uses velocity.js instead of CSS transforms. Add your own transitions to `transitions` hash.
The MIT License (MIT)
Copyright (c) 2014 Tomas Kafka
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: