Skip to content

Instantly share code, notes, and snippets.

@justinschuldt
justinschuldt / keybindings.json
Last active March 10, 2024 05:27
VSCode settings
// Place your key bindings in this file to override the defaults
[
{
"key": "cmd+left",
"command": "workbench.action.navigateBack",
"when": "canNavigateBack"
},
{
"key": "ctrl+-",
"command": "-workbench.action.navigateBack",
@justinschuldt
justinschuldt / raspberry-pi-zero_as_webcam.md
Last active February 25, 2024 07:34
Directions for setting up a RaspberryPi to act as a generic USB webcam

hardware/software

Webcam parts:

  • Raspberry Pi Zero W Rev 1.1
  • Raspberry Pi Camera v2 (8-megapixel)
  • Raspberry Pi High Quality Camera (12.3-megapixel)
  • Raspbian Buster Lite 2020-02-13

Webcam works with:

  • Windows 10
  • Windows 10 "Camera" app
@justinschuldt
justinschuldt / karabiner.edn
Last active July 18, 2023 09:59
keyboard layers for MacOS with Karabiner-Elements and GokuRakuJoudo formatting
{
:layers {
; implement caps lock mode
:caps_layer {:key :caps_lock :alone {:key :escape}}
; make tab a layer if/when it is held
:tab_layer {:key :tab :alone {:key :tab}}
:backslash_layer {:key :backslash :alone {:key :backslash}}
}
@justinschuldt
justinschuldt / launch.json
Last active February 2, 2023 21:36
wormhole node debugger config
{
"version": "0.2.0",
"configurations": [
{
"name": "Connect to server",
"type": "go",
"request": "attach",
"mode": "remote",
"remotePath": "${workspaceFolder}",
"port": 2345,
@justinschuldt
justinschuldt / main.go
Created October 27, 2022 13:16
Golang implement encoding.BinaryMarshaler & encoding.BinaryUnmarshaler example
// Golang program to illustrate the implementation of
// a encoding.BinaryMarshaler interface, and
// a encoding.BinaryUnmarshaler interface for a struct.
package main
import (
"bytes"
"encoding/binary"
"fmt"
@justinschuldt
justinschuldt / Tiltfile
Created August 4, 2022 21:30
wormhole devnet cluster monitoring
# grafana + prometheus for node metrics
if node_metrics:
dashboard_files = listdir("dashboards")
dashboards = {}
for d in dashboard_files:
file_name = d.split("/")[-1]
if file_name.endswith(".json"):
dashboards[file_name] = encode_json(read_json(d))
@justinschuldt
justinschuldt / kint36-i3wm-keys-and-vim-layer.json
Created December 8, 2021 06:45
QMK keymap for a Kinesis Advantage2 running the Stapelberg kint36 controller. This keymap provides OS keys for i3wm, and a layer with VIM controls.
{
"version": 1,
"notes": "For QMK Configurator. You can view this by importing it at <https://config.qmk.fm/#/kinesis/kint36/LAYOUT>. It can also be used directly with QMK's source code",
"documentation": "QMK keymap for a Kinesis Advantage2 running the Stapelberg kint36 controller. This keymap provides OS keys for i3wm, and a layer with VIM controls. Build info: <https://github.com/kinx-project/kint> \n",
"keyboard": "kinesis/kint36",
"keymap": "kint36-updated-layer-toggles",
"layout": "LAYOUT",
"layers": [
[
"KC_ESC",
@justinschuldt
justinschuldt / Tiltfile
Created May 18, 2022 09:12
grafana + prometheus for wormhole's devnet
config.define_bool("node_metrics", False, "Enable Prometheus & Grafana for Guardian metrics")
node_metrics = cfg.get("node_metrics", False)
# grafana + prometheus for node metrics
if node_metrics:
import { ethers } from "ethers";
const rpc = 'http://localhost:8545'
const senderAddress = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"
const senderPrivateKey = "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d" // ganche default
const addresses = [
"0xE11BA2b4D45Eaed5996Cd0823791E0C93114882d",
"0xd03ea8624C8C5987235048901fB614fDcA89b117",
"0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC",
"0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9",
@justinschuldt
justinschuldt / Tiltfile
Created March 18, 2022 09:48
local Ethereum explorer for wormhole - WIP
config.define_bool("evm_explorer", False, "Enable EVM explorer")
evm_explorer = cfg.get("evm_explorer", False)
if evm_explorer:
k8s_yaml_with_ns("devnet/eth-devnet-ui.yaml")
k8s_resource("eth-ui-redis", resource_deps=["eth-devnet"], labels = ["evm"])