mkdir /opt/rsync-backup
cd /opt/rsync-backup
go mod init rsync-backup
go mod tidy
go build .
mkdir -p /etc/sysusers.d /etc/tmpfiles.d
ln -sf /opt/rsync-backup/rsync-backup.sysusers /etc/sysusers.d/rsync-backup.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
process() { | |
local adb_addr pair_code pair_addr vars="$( | |
set -euo pipefail | |
magick "$1" -white-threshold 30% -black-threshold 20% PNG:- | | |
tesseract --psm 3 stdin stdout | | |
sed -E 's/^\w\s//' | | |
tr '\n' '#' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/hex" | |
"net" | |
"os" | |
"golang.org/x/sys/unix" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# our script name | |
self="_exp_reconcile_branches.sh" | |
# check the args | |
if [[ $# -eq 0 ]] | |
then | |
echo "creates a synthetic merge commit from scratch out of the specified branches, then adds it to the history of the current branch" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "pico/stdlib.h" | |
#include "hardware/i2c.h" | |
#include "fnk0079.h" | |
int main() { | |
i2c_init(i2c0, 100 * 1000); | |
gpio_set_function(4, GPIO_FUNC_I2C); | |
gpio_set_function(5, GPIO_FUNC_I2C); | |
gpio_pull_up(4); | |
gpio_pull_up(5); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ==UserStyle== | |
@name Compact Outlook.com Calendar | |
@version 20240124.13.32 | |
@namespace ? | |
==/UserStyle== */ | |
@-moz-document url-prefix("https://outlook.office.com/calendar/view/week"), url-prefix("https://outlook.office.com/calendar/view/workweek"), url-prefix("https://outlook.office.com/calendar/view/day") { | |
/* collapse global nav unless hovering over edge */ | |
#appContainer:not(:hover:not(:has(* >#MainModule:hover))) { | |
:has(> #MainModule) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package redshift | |
import ( | |
"github.com/jezek/xgb" | |
"github.com/jezek/xgb/randr" | |
"github.com/jezek/xgb/xproto" | |
) | |
// ColorRamp calculates the gamma ramp with the specified parameters. Use a | |
// value of 1 for the white values for the default ramp. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -eu | |
encode_integer() { | |
local value=$1 | |
printf "0x10 0x%08X" $((value&0xFFFFFFFF)) | |
} | |
encode_dimen() { | |
# https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/util/TypedValue.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Beware! This file is rewritten by htop when settings are changed in the interface. | |
# The parser is also very primitive, and not human-friendly. | |
htop_version=3.2.2 | |
config_reader_min_version=3 | |
fields=0 48 38 39 119 40 2 46 47 49 1 | |
hide_kernel_threads=1 | |
hide_userland_threads=1 | |
hide_running_in_container=0 | |
shadow_other_users=0 | |
show_thread_names=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
cd "$(dirname "$0")" | |
if [[ $# -ne 1 ]] && [[ $# -ne 2 ]]; then | |
echo "usage: $0 fw [old_fw]" | |
exit 2 | |
fi | |
test -f ~/kp/v/$1/nickel |
NewerOlder