Skip to content

Instantly share code, notes, and snippets.

Avatar

Zach Bloomquist flotwig

View GitHub Profile
View gist:b62010eb5d1ee98f938b4f1e4892bc87
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
View benchmarks.md
View amicoding
[2022-01-16T10:08:03-05:00] [2022-01-16T10:13:03-05:00]
[2022-01-15T15:26:56-05:00] [2022-01-15T22:43:20-05:00]
[2022-01-08T17:24:43-05:00] [2022-01-08T17:36:18-05:00]
[2022-01-07T11:03:02-05:00] [2022-01-07T12:38:03-05:00]
[2021-12-08T22:50:03-05:00] [2021-12-08T22:55:03-05:00]
[2021-12-07T21:13:32-05:00] [2021-12-07T21:21:31-05:00]
[2021-12-06T22:18:09-05:00] [2021-12-06T22:23:09-05:00]
[2021-12-05T16:48:40-05:00] [2021-12-06T20:14:44-05:00]
[2021-11-20T19:56:46-05:00] [2021-11-20T21:16:46-05:00]
[2021-11-20T11:10:46-05:00] [2021-11-20T11:21:45-05:00]
@flotwig
flotwig / internet-wg0.conf
Last active Nov 21, 2021
WireGuard configuration
View internet-wg0.conf
[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 Jun 18, 2019
node.js client certificate experiments
View pki.js
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) => {
View net-layer.md
  • 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
Cypress performance tests
View performance.csv
branch name time url disableHttp2 upstreamProxy httpsUpstreamProxy cyProxy cyIntercept
@flotwig
flotwig / gen.sh
Last active Jul 19, 2021
Generate a Chrome extension ID with a desired prefix
View gen.sh
#!/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
View net-profiler.js
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'
}
}
@flotwig
flotwig / 1. server.py.md
Last active Feb 18, 2019 — forked from IbroCalculus/server.py
Server code for python remote access of another machine on which the server part of this code has been installed
View 1. server.py.md

import socket

s = socket.socket()

host = socket.gethostname() port = 9009 s.bind((host,port)) print('This host/server ID is: ', host) print('\n',host,'has been binded to',port) print('\nServer is listening for incoming connections')