Skip to content

Instantly share code, notes, and snippets.

View wwalker's full-sized avatar

Wayne Walker wwalker

View GitHub Profile
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 / .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-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;
@wwalker
wwalker / wpa_supplicant-debug
Last active August 3, 2021 17:22
rpi zero w 2017 - won't connect
@~ ✓ $ wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -d | ilts
2021-08-02_16:25:41.054147 - wpa_supplicant v2.8-devel
2021-08-02_16:25:41.066596 - random: getrandom() support available
2021-08-02_16:25:41.075278 - Successfully initialized wpa_supplicant
2021-08-02_16:25:41.082071 - Initializing interface 'wlan0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
2021-08-02_16:25:41.086163 - Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf'
2021-08-02_16:25:41.089988 - Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'
2021-08-02_16:25:41.094142 - ctrl_interface='DIR=/var/run/wpa_supplicant GROUP=netdev'
2021-08-02_16:25:41.097946 - update_config=1
2021-08-02_16:25:41.101952 - country='US'
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
// from <sys/time.h>
// used timersub macro, changed timeval to timespec
// kept the order of operands the same, that is a - b = result
# define timespec_diff_macro(a, b, result) \
@wwalker
wwalker / Installing.md
Created July 16, 2021 06:26 — forked from DarinM223/Installing.md
Installing GHC Mod

Installing GHC Mod

  1. Go to ~/.stack/global-project/stack.yaml and change the resolver: section to lts-10.3.

  2. Add:

- https://hackage.haskell.org/package/ghc-mod-5.9.0.0/candidate/ghc-mod-5.9.0.0.tar.gz
- cabal-helper-0.8.0.0
@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