Skip to content

Instantly share code, notes, and snippets.

View flotwig's full-sized avatar

Zach Bloomquist flotwig

View GitHub Profile
@flotwig
flotwig / gh-comments.user.js
Created April 20, 2022 17:47
recursively load github comments userscript
// ==UserScript==
// @name recursively load github comment threads
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author https://github.com/refined-github/refined-github/issues/1892#issuecomment-1044913449
// @match https://github.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
// @grant none
// ==/UserScript==
@flotwig
flotwig / gist:b62010eb5d1ee98f938b4f1e4892bc87
Created August 17, 2021 16:31
electron 13.17.1 sigsegv
Process: Cypress [729]
Path: /Users/USER/Library/Caches/*/Cypress.app/Contents/MacOS/Cypress
Identifier: com.electron.cypress
Version: 8.3.0 (8.3.0.848520)
Code Type: X86-64 (Native)
Parent Process: ??? [724]
Responsible: Terminal [379]
User ID: 501
Date/Time: 2021-08-17 09:22:42.346 -0700
[2023-04-02T16:13:32-04:00] [2023-04-02T16:18:32-04:00]
[2023-04-01T23:57:36-04:00] [2023-04-02T01:39:11-04:00]
[2023-04-01T23:30:06-04:00] [2023-04-01T23:45:06-04:00]
[2023-04-01T20:03:54-04:00] [2023-04-01T22:34:38-04:00]
[2023-03-30T12:45:23-04:00] [2023-03-30T13:52:35-04:00]
[2023-03-30T12:39:11-04:00] [2023-03-30T12:44:53-04:00]
[2023-03-29T12:14:51-04:00] [2023-03-29T12:19:51-04:00]
[2023-03-28T12:36:13-04:00] [2023-03-28T13:44:10-04:00]
[2023-03-28T02:56:59-04:00] [2023-03-28T03:03:36-04:00]
[2023-03-28T02:49:11-04:00] [2023-03-28T02:54:11-04:00]
@flotwig
flotwig / internet-wg0.conf
Last active November 21, 2021 11:01
WireGuard configuration
[Interface]
# Configuration for the server
# Set the IP subnet that will be used for the WireGuard network.
# 10.222.0.1 - 10.222.0.255 is a memorable preset that is unlikely to conflict.
Address = 10.222.0.1/24
# The port that will be used to listen to connections. 51820 is the default.
ListenPort = 51820
@flotwig
flotwig / pki.js
Last active June 18, 2019 18:47
node.js client certificate experiments
const assert = require('assert')
const Bluebird = require('bluebird')
const certyCb = require('certy')
const https = require('https')
const rp = require('request-promise')
const certy = Bluebird.promisifyAll(certyCb)
certy.createAsync()
.then((certs) => {
  • Bugs:
    • #76 - Node has a constant header size limit of 80kb
  • Serve dynamic HTTP/1.1 content on any http[s]://host:port/path combination
    • can serve pre-configured static responses to regex or glob urls
type GlobPattern = string
type StringMatcher = GlobPattern | RegEx
type StringDictMatcher = { [key: string]: StringMatcher }
type NumberMatcher = number | number[] // list of acceptable numbers
@flotwig
flotwig / performance.csv
Last active May 1, 2019 19:22
Cypress performance tests
branch name time url disableHttp2 upstreamProxy httpsUpstreamProxy cyProxy cyIntercept
@flotwig
flotwig / gen.sh
Last active October 5, 2023 08:33
Generate a Chrome extension ID with a desired prefix
#!/bin/bash
# https://stackoverflow.com/a/23877974/3474615
while [[ $EXT_PREFIX != "ioio" ]] # change 'ioio' to your desired prefix (can only use lowercase a-p)
do
rm key.pem manifest_key.txt extension_id.txt
2>/dev/null openssl genrsa 2048 | openssl pkcs8 -topk8 -nocrypt -out key.pem
2>/dev/null openssl rsa -in key.pem -pubout -outform DER | openssl base64 -A > manifest_key.txt
const fs = require('fs')
const debug = require('debug')('net-profiler')
function getCaller (level = 5) {
try {
return new Error().stack.split('\n')[level].slice(7)
} catch (e) {
return 'unknown'
}
}