Skip to content

Instantly share code, notes, and snippets.

View wwalker's full-sized avatar

Wayne Walker wwalker

View GitHub Profile
#!/bin/bash -x
launch_and_mark(){
local window_role=$1
local startup_sleep=$2
shift 2
launch "$@"
id=
@wwalker
wwalker / 0-why-borg-prune-no-work.md
Last active May 18, 2022 03:43
borg prune doesn't appear

So I am running borg prune via borgmatic. You can see in the attached beeper.prune that borg is being called like this:

borg prune --keep-within 3H --keep-hourly 24 --keep-daily 7 --keep-weekly 52 --keep-monthly 18 --keep-yearly 1 --prefix {hostname}- --debug --show-rc --list -v --debug --stats /4T/borg/beeper

There are no backups newer than 3 hours, so, at most, after prune runs, there should be, at most 102 archives: # assuming that there are no backups being counted as two of these:

  • 24 hourlies +
  • 7 dailies +
  • 52 weeklies +
dnf download --source meson
rpm -i meson-0.59.4-1.fc35.src.rpm
cd ~/rpmbuild/SPECS
vim meson.spec
# change 0.59.4 to 0.60.0
cd ../SOURCES
wget https://github.com/mesonbuild/meson/releases/download/0.60.0/meson-0.60.0.tar.gz
cd ../SPECS
rpmbuild -ba meson.spec
@wwalker
wwalker / trace_header.sh
Last active April 6, 2022 03:43
Bash -x tracing without the clutter
#!/bin/bash
# the following sets up a bash script to write the -x tracing to a log file
# in /tmp, with a meaningful, unique name, and a trap to remove it if the
# script completes successfully. Therefore, if the script fails, in any
# way, the log is there to peruse. If it succeeds (exit 0) then nothing
# is left behind
# Set up a function to remove the trace file on successful run (exit 0)
cleanup_trace_file() {
@wwalker
wwalker / .bash_logout
Last active January 25, 2022 23:31
Why does this sometimes not save the session history
# ~/.bash_logout
cat "$HISTFILE" >> "$HOME"/.bash_history && /bin/rm "$HISTFILE"
When I do the following, I can then access prometheus node exporter (9100/tcp) from my house,
but I can no longer ssh in from my house (I can ssh in from ANYWHERE ELSE just fine.
What is wrong with this:
@wwalker
wwalker / dynamic-used-in-resource.tf
Last active October 22, 2021 15:46
dynamic for example terraform
variable "ephemeral_block_device" {
type = map(string)
default = {
"sdb" = "ephemeral0"
"sdc" = "ephemeral1"
"sdd" = "ephemeral2"
"sde" = "ephemeral3"
"sdf" = "ephemeral4"
"sdg" = "ephemeral5"
}
@wwalker
wwalker / i3-alt-tab-ww
Created July 8, 2021 16:03
my i3 alt-tab functionality - work in progress
#!/usr/bin/env python3
#
# modified by wwalker (wwalker@solid-constructs.com) from example script
# https://github.com/altdesktop/i3ipc-python/blob/master/examples/i3-cycle-focus.py
#
# provides alt+tab functionality between windows, switching
# between n windows; example i3 conf to use:
# exec_always --no-startup-id i3-alt-tab-ww
# bindsym Shift+$alt+Tab exec --no-startup-id i3-select-recent-window
# bindsym $alt+Tab exec --no-startup-id i3-alt-tab-ww --switch
@wwalker
wwalker / i3-config
Created September 21, 2021 01:24
i3 + rofi + setting window roles
bindsym --release Shift+$super+m exec --no-startup-id set-wm-window-role
# My rofi setup for window mode. ONLY matches on role
bindsym $super+l exec --no-startup-id "rofi -show window -window-match-fields role -sort -auto-select -sorting-method fzf -show-icons -matching regex -filter ^"
/************************************************
* ROFI Color theme
* User: leofa
* Copyright: 2017 leofa
***********************************************/
* {
selected-normal-foreground: rgba ( 249, 249, 249, 100 % );
foreground: rgba ( 196, 203, 212, 100 % );
normal-foreground: @foreground;