sudo dpkg-divert --rename --add /usr/lib/firmware/mediatek/WIFI_MT7922_patch_mcu_1_1_hdr.bin
sudo dpkg-divert --rename --add /usr/lib/firmware/mediatek/WIFI_RAM_CODE_MT7922_1.bin
dpkg-divert --list
#pushd ~/src/linux-firmware/mediatek
# You need the following entry in the control file: | |
XS-Go-Import-Path: github.com/linux4life798/cmpconflash |
ssd_show_data() { | |
sudo dd if=/dev/nvme0n1 bs=1 count=9000 status=none | hd | |
} | |
# ssd_write_data <data_message> [location] | |
# | |
# location is the offset in bytes. | |
ssd_write_data() { | |
local data="$1" | |
local location="${2:-0}" # In bytes |
# This is an example ddclient configuration that uses fetch-nest-wan-ipv4.sh | |
# and Cloudflare. | |
# The fetch-nest-wan-ipv4.sh script must be in whatever working directory ddclient | |
# is run from, or change the below path to the command to be absolute. | |
###################################################################### | |
## | |
## Define default global variables with lines like: | |
## var=value [, var=value]* | |
## These values will be used for each following host unless overridden |
FROM debian:latest | |
ENV USER me | |
RUN useradd --create-home --user-group "${USER}" | |
# HOME will be set already within the container, after setting user, but we | |
# set it here to be usable from within this Dockerfile. | |
ENV HOME "/home/${USER}" | |
WORKDIR "${HOME}" | |
RUN pwd |
#!/bin/bash | |
# Craig Hesling | |
# | |
# Find a change in Git's vast dangling blob/commmit archive. | |
# | |
# Usage: find-change.bash <grep-pattern1> [<grep-patter2> [grep-patterns...]] | |
mapfile -t LOST < <(git fsck --lost-found) | |
PATTERNS=( "$@" ) |
#include <atomic> | |
#include <chrono> | |
#include <iostream> | |
#include <semaphore> | |
#include <thread> | |
/* | |
* g++ -std=c++20 context-switch-vs-spin-wait.cc && ./a.out | |
*/ |
# This is an example ddclient configuration that uses fetch-nest-wan-ipv4.sh | |
# and Cloudflare. | |
# The fetch-nest-wan-ipv4.sh script must be in whatever working directory ddclient | |
# is run from, or change the below path to the command to be absolute. | |
###################################################################### | |
## | |
## Define default global variables with lines like: | |
## var=value [, var=value]* | |
## These values will be used for each following host unless overridden |
/* | |
* sample_noise.c | |
* | |
* Created on: Sep 10, 2018 | |
* Author: Craig Hesling | |
*/ | |
#include <xdc/runtime/System.h> | |
#include <ti/sysbios/BIOS.h> // BIOS_WAIT_FOREVER | |
#include <ti/sysbios/knl/Event.h> |
import CRAND "crypto/rand" | |
// GenMQTTClientID generates a random client id for mqtt | |
func GenMQTTClientID(prefix string) (string, error) { | |
r, err := CRAND.Int(CRAND.Reader, new(big.Int).SetInt64(100000)) | |
if err != nil { | |
return "", fmt.Errorf("Failed to generate MQTT client ID: %v", err) | |
} | |
return prefix + r.String(), nil | |
} |