Skip to content

Instantly share code, notes, and snippets.

@eiri
eiri / README.md
Created December 23, 2022 15:17
RCRE regexp to match on valid JSON
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
if [[ "${TRACE-0}" == "1" ]]; then
set -o xtrace
fi
if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then
@eiri
eiri / solarized-colors.md
Created June 9, 2022 16:39 — forked from ninrod/solarized-colors.md
Solarized Dark values on different color palettes

Solarized Dark values on different color palettes

SOLARIZED HEX 16/8 TERMCOL XTERM HEX L*A*B RGB HSB GNU screen
base03 #002b36 8/4 brblack 234 #1c1c1c 15,-12,-12 0,43,54 193,100,21 K
base02 #073642 0/4 black 235 #262626 20,-12,-12 7,54,66 192,90,26 k
base01 #586e75 10/7 brgreen 240 #585858 45,-07,-07 88,110,117 194,25,46 G
base00 #657b83 11/7 bryellow 241 #626262 50,-07,-07 101,123,131 195,23,51 Y
base0 #839496 12/6 brblue 244 #808080 60,-06,-03 131,148,150 186,13,59 B
base1 #93a1a1 14/4 brcyan 245 #8a8a8a `65,-05
@eiri
eiri / .curlrc
Created August 21, 2021 03:18
Adding a new node to CouchDB cluster primer
-s
-H "Content-Type: application/json"
-H "Accept: application/json"
-u admin:god
@eiri
eiri / ffmpeg.md
Created April 28, 2021 23:49 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
@eiri
eiri / index.html
Created October 4, 2020 15:32
Embedded vega-lite with async data load and transform
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<script src="vega.min.js"></script>
<script src="vega-lite.min.js"></script>
<script src="vega-embed.min.js"></script>
@eiri
eiri / main.go
Last active August 3, 2020 03:32
Script to generate CouchDB authentication cookie with expiration period of one year
package main
import (
"bytes"
"crypto/hmac"
"crypto/sha1"
"encoding/base64"
"flag"
"fmt"
"os"
@eiri
eiri / nerd_font.py
Last active July 30, 2020 15:05
nerd font, print devicons range
def print_nerd_font():
print('# Nerd - Pomicons:')
for c in range(0xe000, 0xe00b):
print(f'{hex(c)} - {chr(c)}')
print('# Nerd - Powerline + extra:')
for c in range(0xe0a0, 0xe0a4):
print(f'{hex(c)} - {chr(c)}')
for c in range(0xe0b0, 0xe0c9):
print(f'{hex(c)} - {chr(c)}')
@eiri
eiri / README.md
Last active April 19, 2020 21:51
Aegis key cache flow chart