Skip to content

Instantly share code, notes, and snippets.

package mw
import (
"bytes"
"encoding/json"
"log"
"net/http"
gojose "gopkg.in/square/go-jose.v2"
)
[[redirects]]
from = "/admin/*"
to = "https://my-cool-services-somewhere-else.org/whatever-subroute-needed/:splat"
status = 200
force = true
signed = "API_SIGNATURE_TOKEN"
roles = ["admin"]
from = "/protectedapis/*"
to = "https://my-cool-services-somewhere-else.org/another-subroute-needed/:splat"
@rwboyer
rwboyer / image.go
Created December 31, 2021 16:06
Image processing example in Go
package util
import (
"fmt"
"image"
"image/color"
"io"
"log"
"text/template"
@rwboyer
rwboyer / shelley_staking_gen.md
Created March 1, 2021 02:04 — forked from ilap/shelley_staking_gen.md
Extracting Pool Staking keys from Daedalus/Yoroi wallet

Intorduction

DISCLAIMER: NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK

UPDATED: 14:08am AEST 29/Sept/2020, The IDX was incorrectly used. Fixed now

There are two keypairs that are required to register a pool:

  1. reward account (costs and rewards) and
  2. owner stake (pledge) keypair.
@rwboyer
rwboyer / ibm3270
Created December 17, 2020 00:42
ibm3270
/*! Generated by Font Squirrel (https://www.fontsquirrel.com) on December 16, 2020 */
@font-face {
font-family: 'ibm3270regular';
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAADM8AA4AAAAAYvAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABRAAAABwAAAAcgIqFuEdERUYAAAFgAAAAJAAAACYAJwEwT1MvMgAAAYQAAABeAAAAYJevgARjbWFwAAAB5AAAAe4AAALWB578EWN2dCAAAAPUAAAABAAAAAQAQgTzZ2FzcAAAA9gAAAAIAAAACP//AANnbHlmAAAD4AAAJ7UAAE/UQlftjmhlYWQAACuYAAAANgAAADYKNV+2aGhlYQAAK9AAAAAhAAAAJAwPBPZobXR4AAAr9AAAATEAAAQmPY2MeWxvY2EAAC0oAAABxwAAAhYljBFybWF4cAAALvAAAAAgAAAAIAFRAMBuYW1lAAAvEAAAAcYAAAPONPJ/S3Bvc3QAADDYAAACZAAABBwVkzedAAAAAQAAAADah2+PAAAAAMoCvUIAAAAA3ABY5njaY2BkYGDgAWIxBjkGJgZGBkZGTiDJAhRhAmJGCAYACQkAWXjaY2BhkWecwMDKwMIqwlrBwMAoAaGZDzAkM7EyMDAxsHIygMECBqb3QQw/fzMxOBiA+MZG5gaMBxh4fzOxOfwrYNjCFsU4IYGBYf7960Dd21jWAJUoMDACAKmjEbwAAHjajZJXT5RBFIaf+RYWWEBRURERZ1fBLnYFewF7Axs2LPde+wMsMdagJrbohYINGwQssSUqil2MjSJjXNsfsIE7HtgvxMQLPcmc95wz75nyzgAewiMFRbM9lEy15BGcF+yNliiaeKzKU+udSqdO+3SiTtapOqDTdYbO0gW6xB9Ia2p0rJWOeL
@rwboyer
rwboyer / tailwindcssinjs.jsx
Created June 19, 2020 20:21
Tailwindcss babel macro browser vs. SSR vs build
import { css, cx } from '@emotion/css'
import tw from '@tailwindcssinjs/macro'
const styles = {
link: css(tw`
text-sm
block
pb-4
font-semibold
text-sm
const { json, send } = require('micro');
const cors = require('micro-cors')();
const fetch = require('node-fetch');
const parse = require('urlencoded-body-parser');
const crypto = require('crypto');
const Mailgun = require('mailgun-js');
const db = require('../../models/db');
const el = require('../../models/email-list');
const dl = require('../../models/dl-item');
const htmlStandards = require('spike-html-standards')
const cssStandards = require('spike-css-standards')
const latest = require('babel-preset-latest')
const sass = require('sass-loader')
const extract_plug = require('extract-text-webpack-plugin')
module.exports = {
matchers: { css: '*.scss' },
module: {
loaders: [
@charset "UTF-8";
/* Generated by Font Squirrel (https://www.fontsquirrel.com) on May 4, 2016 */
@font-face {
font-family: 'museo_sans500';
src: url("/assets/fonts/museosans_500-webfont.woff2") format("woff2"), url("/assets/fonts/museosans_500-webfont.woff") format("woff");
font-weight: normal;
font-style: normal; }
@font-face {
font-family: 'museo_sans300';
src: url("/assets/fonts//fontsmuseosans-300-webfont.woff2") format("woff2"), url("/assets/fonts/museosans-300-webfont.woff") format("woff");
@rwboyer
rwboyer / 0_reuse_code.js
Created June 27, 2016 16:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console