install keybase packages
keybase kbfs
login
keybase login greyltc
import pgp key from keybase
#!/usr/bin/env python3 | |
"""script that puts holes into pcb""" | |
import pcbnew | |
class HoleMaker(object): | |
"""puts holes into a pcb, units are mm""" | |
board_filename = None | |
pcb = None |
import multiprocessing as mp | |
import time | |
#max number to look up to | |
max_number = 10000 | |
#four processes per cpu | |
num_processes = mp.cpu_count() * 4 | |
def chunks(seq, chunks): |
#!/usr/bin/env python3 | |
# a live plotter for oceanoptics spectrometers | |
# needs https://github.com/ap--/python-seabreeze | |
# written by [email protected] | |
# python3 <(curl -sL https://gist.github.com/greyltc/7bc7d916976e48b3d2fa991444b9cc1e/raw) | |
from seabreeze import spectrometers | |
import numpy as np |
#!/usr/bin/env bash | |
# run this on the remote terminal machine, as auser with sudo powers, probably through a remote ssh shell | |
# this will overwrite all the settings it touches | |
# the name of the user to run these commands as | |
TARGET_USER=jane | |
# we need an inlocked desktop session. we can either start a new autologin one or unlock an existing one |
# opkg list_installed | |
acme - 2.8.3-2 | |
base-files - 212-r11955-b97247c2e9 | |
brcm2708-gpu-fw - 2019-12-11-0c01dbefba45a08c47f8538d5a071a0fba6b7e83 | |
brcm2708-userland - 42ec119e03eb8dffc7c83e2ac0e665e333abbef6-1 | |
brcmfmac-firmware-usb - 20191215-1 | |
busybox - 1.31.1-1 | |
ca-bundle - 20190110-2 | |
cgi-io - 16 | |
cypress-firmware-43455-sdio - v4.14.77-2019_1031 |
Index: linux-gpib-kernel/drivers/gpib/fmh_gpib/fmh_gpib.c | |
=================================================================== | |
--- linux-gpib-kernel/drivers/gpib/fmh_gpib/fmh_gpib.c (revision 1862) | |
+++ linux-gpib-kernel/drivers/gpib/fmh_gpib/fmh_gpib.c (working copy) | |
@@ -982,7 +982,7 @@ | |
} | |
/* Match callback for driver_find_device */ | |
-static int fmh_gpib_device_match(struct device *dev, void *data) | |
+static int fmh_gpib_device_match(struct device *dev, const void *data) |
install keybase packages
keybase kbfs
login
keybase login greyltc
import pgp key from keybase
#!/usr/bin/env bash | |
echo "" | |
echo "=====Before backing up, ensure the following=====" | |
echo "1: All removable drives are unmounted from the VM" | |
echo "2: All VM snapshots are gone (rolled into the base disk image)" | |
echo "3: The VM has been properly shut down" | |
echo "4: VirtualBox is not running" | |
echo "" |
import visa | |
rm = visa.ResourceManager() | |
rn = 'GPIB0::24::INSTR' | |
inst = rm.open_resource(rn) | |
first_idn = inst.query("*IDN?") | |
print(f'Instrument identified as {first_idn.strip()}') | |
q = 0 | |
q_max = 100000 |
# this will search every file recursively for the follwing strings: "0.0055" "0.0060" "0.0065" "0.0069" "0.0072" | |
grep -r -A4 0.0055 . | grep -B1 -A3 0.0060 | grep -B2 -A2 0.0065 | grep -B3 -A1 0.0069 | grep -B4 0.0072 | |
# it will return 4 line matches where the strings are on different consecutive lines and appear in that order | |
grep -r -A2 0.8521 . | grep -B1 -A1 0.8217 | grep -B2 0.791 |