Skip to content

Instantly share code, notes, and snippets.

View davidgengenbach's full-sized avatar
💬
Available for new freelancing projects!

David davidgengenbach

💬
Available for new freelancing projects!
View GitHub Profile
@davidgengenbach
davidgengenbach / output.txt
Last active August 22, 2024 10:23
chainway_ur4
Sending command: C88C00088C840D0A
Sending command: C88C000A2C0104230D0A
Sending command: C88C000A820000880D0A
Received invalid BCC byte. Expected: '0xbd', got: '0xfd' in frame: '0xc88c0019833000e28068940000400e99f21c47ff0901fd0d0a'
Received invalid BCC byte. Expected: '0xbd', got: '0xfd' in frame: '0xc88c0019833000e28068940000400e99f21c47ff0901fd0d0a'
Found valid EPC in frame: e28068940000400e99f21c47
Received invalid BCC byte. Expected: '0xaf', got: '0xbf' in frame: '0xc88c0019833000e28068940000400e99f21c47ff1b01bf0d0a'
Received invalid BCC byte. Expected: '0xbd', got: '0xfd' in frame: '0xc88c0019833000e28068940000400e99f21c47ff0901fd0d0a'
Received invalid BCC byte. Expected: '0x26', got: '0xa6' in frame: '0xc88c0019833000e268940000400e99f21c47ff1201a60d0a'
Found valid EPC in frame: e28068940000400e99f21c47
@davidgengenbach
davidgengenbach / 51_hw_volume.lua
Created August 4, 2022 10:23
2022-08-04 Andy sound
-- Add the content of this gist to .config/wireplumber/bluetooth.lua.d/51_hw_volume.lua
-- /usr/share/wireplumber
bluez_monitor.properties = {
["bluez5.enable-hw-volume"] = true,
["bluez5.headset-roles"] = "[ ]",
}
bluez_monitor.rules = {
@davidgengenbach
davidgengenbach / index.html
Created October 18, 2021 21:08
indexeddb for micha
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Micha test</title>
</head>
<body>
<script>
Vagrant.configure("2") do |config|
# Ubuntu 18.04 LTS
config.vm.box = "ubuntu/bionic64"
config.vm.provider "virtualbox" do |vb|
vb.memory = 16384
vb.cpus = 8
end
config.vm.provision "shell", inline: <<-SHELL
cd /vagrant
@davidgengenbach
davidgengenbach / stratum
Last active December 31, 2020 13:48
tofino-model-stratum
$ sudo -E DOCKER_IMAGE="stratumproject/stratum-bfrt" DOCKER_IMAGE_TAG="9.3.0" PLATFORM="barefoot-tofino-model" /home/dsp/dgengenbach/stratum/stratum/stratum/hal/bin/barefoot/docker/start-stratum-container.sh -bf_sim -bf_switchd_background=false -enable_onlp=false
++ uname -r
++ uname -r
+ docker run -it --rm --privileged -v /dev:/dev -v /sys:/sys -v /lib/modules/4.19.0-13-amd64:/lib/modules/4.19.0-13-amd64 --env PLATFORM=barefoot-tofino-model --network host -v /var/log:/var/log/stratum stratumproject/stratum-bfrt:9.3.0 -bf_sim -bf_switchd_background=false -enable_onlp=false
Mounting hugepages...
Skipping kernel module installation.
bf_sysfs_fname /sys/class/bf/bf0/device/dev_add
Install dir: /usr (0x559eaa0da020)
bf_switchd: system services initialized
bf_switchd: loading conf_file /usr/share/stratum/tofino_skip_p4_no_bsp.conf...
$ ./start_p4runtime_shell.sh
++ pwd -P
+ DEFAULT_P4_PROGRAM_PATH=/sapmnt/home/XXXXXX/Projects/tmp/stratum-tofino_2020_12_19__10_51_12/third_party/fabric-tofino/src/main/resources/p4c-out/fabric/tofino/montara_sde_9_0_0/
+ P4_PROGRAM_PATH=/sapmnt/home/XXXXXX/Projects/tmp/stratum-tofino_2020_12_19__10_51_12/third_party/fabric-tofino/src/main/resources/p4c-out/fabric/tofino/montara_sde_9_0_0/
+ ./third_party/p4runtime-shell/config_builders/tofino.py --ctx-json /sapmnt/home/XXXXXX/Projects/tmp/stratum-tofino_2020_12_19__10_51_12/third_party/fabric-tofino/src/main/resources/p4c-out/fabric/tofino/montara_sde_9_0_0//pipe/context.json --tofino-bin /sapmnt/home/XXXXXX/Projects/tmp/stratum-tofino_2020_12_19__10_51_12/third_party/fabric-tofino/src/main/resources/p4c-out/fabric/tofino/montara_sde_9_0_0//pipe/tofino.bin -p yes -o /sapmnt/home/XXXXXX/Projects/tmp/stratum-tofino_2020_12_19__10_51_12/third_party/fabric-tofino/src/main/resources/p4c-out/fabric/tofino/montara_sde_9_0_0//out.bin
+ ls /sapmnt/home/XXXXXX/Projec
@davidgengenbach
davidgengenbach / convert-latex-to-html.sh
Created July 12, 2020 22:13
convert-latex-to-html.sh
#!/usr/bin/env bash
set -e
rm -f thesis.html
git pull
pandoc -f latex -s main.tex -o thesis.html -t html5
sed -i 's/ <span class="citation"/<span class="citation"/g' thesis.html
echo '<style type="text/css">.footnotes,[id^="fig"],header,.footnote-ref,.math.display,table,figure{display:none} body{max-width: 800px; margin: auto}</style>' >> thesis.html
configuration {
/* modi: "window,run,ssh";*/
/* width: 50;*/
lines: 2;
/* columns: 1;*/
font: "mono 16";
/* bw: 1;*/
/* location: 0;*/
/* padding: 5;*/
/* yoffset: 0;*/
@davidgengenbach
davidgengenbach / output
Last active January 11, 2019 09:07
dredd - swagger $ref - bug
+ echo '#### This is the response'
#### This is the response
+ curl https://httpbin.org/get
{
"args": {},
"headers": {
"Accept": "*/*",
"Connection": "close",
"Host": "httpbin.org",
"User-Agent": "curl/7.60.0"
#!/usr/bin/env bash
IN="$1"
OUT="$2"
HIGHPASS=${3:-200}
LOWPASS=${4:-3000}
OPTIONS="-hide_banner -stats -loglevel error -n"
if [[ -z "$IN" || -z "$OUT" ]]; then
echo "Usage: $0 IN_FILE OUT_FILE [HIGHPASS] [LOWPASS]"