Skip to content

Instantly share code, notes, and snippets.

View wwalker's full-sized avatar

Wayne Walker wwalker

View GitHub Profile
- alert: InstanceDown
expr: up{job="node"} == 0
for: 5m
labels:
name: InstanceDown
severity: critical
annotations:
description: '{{ $labels.instance }} of job {{ $labels.job }} has been down
for more than 5 minutes.'
summary: Down
  • First support:
Bold
Underline
InvertColors
ClearAttributes
ResetAllAttributes

Red
IntenseRed
{"version": 2, "width": 117, "height": 31, "timestamp": 1595036531, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}}
[0.400303, "o", "\u001b]0;[email protected]\u0007"]
[0.438987, "o", "\u001b[36m2020-07-17 20:42:12\u001b[0m - \u001b[32mwwalker\u001b[0m@\u001b[91mplutonium\u001b[0m:\u001b[94m~\u001b[0m \u001b[32m✓\u001b[0m $ "]
[5.51146, "o", "v"]
[5.663079, "o", "i"]
[5.804811, "o", "m"]
[6.619074, "o", "\b\u001b[K"]
[6.808877, "o", "\b\u001b[K"]
[6.990556, "o", "\b\u001b[K"]
[7.499317, "o", "l"]
@wwalker
wwalker / shellckeck-disable-scope.md
Last active July 14, 2020 16:44
shellcheck how to disable a small scope

I need to ignore these 3 lines without ignoring everything after them. I've tried this, but, as expected, it ignores to the end of the file:

# shellcheck disable=SC2086
# shellcheck disable=SC2139
alias foralldo='for i in '$envs'; do echo "******************************"; echo "$i";'
alias formostdo='for i in '$dcmost'; do echo "******************************"; echo "$i";'
alias forproddo='for i in '$dcprod'; do echo "******************************"; echo "$i";'
#!/usr/bin/perl
# A simple web server that just listens for textarea filter requests
# and runs an editor to manipulate the text. Is intended to be
# used with the TextAid extention for Chrome.
use strict;
use warnings;
use threads;
use Socket;
use IO::Select;
2020-06-06 23:54:29 - wwalker@plutonium:~/tmp/jwash ✓ $ awk 'BEGIN{FS=OFS="2020.04.05|"}{if (NR == 1) {print "date|"$0} else {print value OFS $0}}' input
date|Number|Title|URL|Type|Genre
2020.04.05|70000000|14 Blades|https://www.netflix.com/title/70130142|Movies|Action & Adventure
2020.04.05|70000000|2012|https://www.netflix.com/title/70108779|Movies|Action & Adventure
2020.04.05|80000000|24 Hours to Live|https://www.netflix.com/title/80208951|Movies|Action & Adventure
2020.04.05|80000000|25 Kille|https://www.netflix.com/title/80137461|Movies|Action & Adventure
2020.04.05|81000000|5 Cowok Jagoan|https://www.netflix.com/title/81037984|Movies|Action & Adventure
2020.04.05|80000000|6 Days|https://www.netflix.com/title/80178280|Movies|Action & Adventure
2020.04.05|81000000|6 Underground|https://www.netflix.com/title/81001887|Movies|Action & Adventure
@wwalker
wwalker / xfce4-clipman-actions.xml
Created June 5, 2020 19:12
xfce4-clipman-actions.xml
2020-06-05 14:09:09 - wwalker@polonium:~ ✓ $ cat /usr/bin/epoch_to_rfc_3339
#!/bin/bash
echo $1 > /tmp/wtf
xmessage $(date -d @$1 +%FT%T)
2020-06-05 14:09:19 - wwalker@polonium:~ ✓ $ rm /tmp/wtf
rm: remove regular file '/tmp/wtf'? y
2020-06-05 14:09:28 - wwalker@polonium:~ ✓ $ date +%s
1591384173
# here I select the number
2020-05-28 14:04:13 - wwalker@polonium:~ ✓ $ sudo dnf clean all
92 files removed
2020-05-28 14:04:19 - wwalker@polonium:~ ✓ $ sudo dnf update kernel-headers
Dependencies resolved.
Nothing to do.
Complete!
2020-05-28 14:05:27 - wwalker@polonium:~ ✓ $ rpm -q kernel-headers
kernel-headers-5.6.11-200.fc31.x86_64
2020-05-28 14:06:05 - wwalker@polonium:~ ✓ $ uname -a
Linux polonium 5.6.13-200.fc31.x86_64 #1 SMP Thu May 14 23:26:14 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
@wwalker
wwalker / 0 - infor first
Created May 12, 2020 20:41
i3 nagbar fails to start second time.
If I have a config error (at the very end of the file,
so most everything is loaded, and I do "reload", the first time the nagbar
comes up and I can view the errors and edit the config.
However, if I then reload again (having not fixed the error, I see i3
refraw portions of the display (as is expected with a reload), but no nagbar.
starting with i3-with-shmlog, I see the attached errors.
For some reason i3 thinks i3-nagbar is still running, but it is not.
cat a
May 3 20:22:54 mail named[3365]: 03-May-2020 20:22:54.127 general: info: received control channel command 'stop'
May 3 20:22:54 mail named[3365]: 03-May-2020 20:22:54.128 general: info: shutting down: flushing changes
May 3 20:22:54 mail named[3365]: 03-May-2020 20:22:54.128 general: notice: stopping command channel on 127.0.0.1#953
May 3 20:22:54 mail named[3365]: 03-May-2020 20:22:54.129 network: info: no longer listening on 127.0.0.1#53
May 3 20:22:54 mail named[3365]: 03-May-2020 20:22:54.129 network: info: no longer listening on 162.243.37.190#53
May 3 20:22:54 mail named[3365]: 03-May-2020 20:22:54.147 general: notice: exiting
May 3 20:22:54 mail named[6461]: starting BIND 9.11.4-P2-RedHat-9.11.4-16.P2.el7_8.2 (Extended Support Version) <id:7107deb>
May 3 20:22:54 mail named[6461]: running on Linux x86_64 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020
May 3 20:22:54 mail named[6461]: built with '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefi