Skip to content

Instantly share code, notes, and snippets.

@kenyon
kenyon / penalize-only-questers.diff
Last active October 26, 2024 21:33
IdleRPG patch to penalize only questers instead of all players
--- bot.v3.1.2.pl 2018-01-04 16:54:48.373134641 -0800
+++ bot.v3.1.2-PenalizeOnlyQuesters.pl 2018-01-04 16:54:33.153317772 -0800
@@ -1939,7 +1939,7 @@
"and to tend downwards with great weight and ".
"pressure towards hell. Therefore have you drawn ".
"yourselves 15 steps closer to that gaping maw."));
- for $player (grep { $rps{$_}{online} } keys %rps) {
+ for $player (@{$quest{questers}}) {
my $gain = int(15 * ($opts{rppenstep}**$rps{$player}{level}));
$rps{$player}{pen_quest} += $gain;
May 31 06:54:09 beta systemd[1]: Starting Daily apt upgrade and clean activities...
May 31 06:54:09 beta unattended-upgrade[594570]: Enabled logging to syslog via daemon facility
May 31 06:54:09 beta unattended-upgrade[594570]: Checking if system is running on battery is skipped. Please install powermgmt-base package to check power status and skip installing updates when the system is running on battery.
May 31 06:54:09 beta unattended-upgrade[594570]: Starting unattended upgrades script
May 31 06:54:09 beta unattended-upgrade[594570]: Allowed origins are: origin=Debian,codename=bullseye,label=Debian, origin=Debian,codename=bullseye-security,label=Debian-Security, origin=apt.postgresql.org, origin=Debian Backports,codename=bullseye-backports,label=Debian Backports, origin=Debian,codename=bullseye-updates,label=Debian, origin=Docker, origin=gh, origin=Puppetlabs,component=puppet-tools, origin=vscode stable
May 31 06:54:09 beta unattended-upgrade[594570]: Initial blacklist:
May 31 06:54:09 beta unattended-upgra
@kenyon
kenyon / composelist.sh
Last active July 22, 2021 18:32 — forked from mortenson/composelist.sh
List all Docker Compose projects currently running
#!/bin/bash
docker contianer ps --filter "label=com.docker.compose.project" -q | xargs docker container inspect --format='{{index .Config.Labels "com.docker.compose.project"}}' | sort -u
@kenyon
kenyon / facter
Created November 24, 2020 07:27
facter and puppet facts show
aio_agent_version => 7.0.0
augeas => {
version => "1.12.0"
}
disks => {
sda => {
model => "SAMSUNG SSD PM83",
size => "119.24 GiB",
size_bytes => 128035676160,
type => "ssd",
@kenyon
kenyon / tmux-256color
Last active November 11, 2019 20:07
tmux-256color
# From Debian ncurses-term 6.1+20181013-2+deb10u2
# infocmp tmux-256color
# Reconstructed via infocmp from file: /usr/share/terminfo/t/tmux-256color
tmux-256color|tmux with 256 colors,
am, hs, km, mir, msgr, xenl,
colors#0x100, cols#80, it#8, lines#24, pairs#0x10000,
acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
clear=\E[H\E[J, cnorm=\E[34h\E[?25h, cr=\r,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
@kenyon
kenyon / gist:aed6cd45a137133feea6508c23d35cd3
Last active June 15, 2019 20:53
get IP addresses of a VM which is running qemu-guest-agent
virsh --connect qemu:///system qemu-agent-command VM_NAME '{"execute":"guest-network-get-interfaces"}' | jq --raw-output '.return[] | select(.name != "lo")["ip-addresses"][] | select(."ip-address-type" == "ipv6") | select(."ip-address"|startswith("fe80")|not)."ip-address"'
Or, simpler: virsh --connect qemu:///system domifaddr VM_NAME --source agent | awk '$NF ~ /:/ && !/(fe80)|::1/ {print $NF}' | cut --delimiter / --fields 1
@kenyon
kenyon / client.conf
Last active May 31, 2019 01:07
OpenVPN configuration
dev tun
remote darwin.kenyonralph.com 1194 udp6
remote darwin.kenyonralph.com 1194 udp4
client
remote-cert-tls server
ca /etc/openvpn/ca.crt
cert /etc/openvpn/gauss.crt
key /etc/openvpn/gauss.key
tls-crypt /etc/openvpn/tls-crypt-key
persist-tun
@kenyon
kenyon / packages.rb
Last active February 9, 2023 14:12
# Puppet Facter custom fact. Return a list of packages installed on
# the system as a hash, mapping the package name to the version.
# © 2018 Kenyon Ralph
# SPDX-License-Identifier: GPL-3.0-or-later
Facter.add(:packages) do
setcode do
packages = {}
case Facter.value(:os)['family']
Hop limit : 64 ( 0x40)
Stateful address conf. : Yes
Stateful other conf. : Yes
Mobile home agent : No
Router preference : medium
Neighbor discovery proxy : No
Router lifetime : 1800 (0x00000708) seconds
Reachable time : unspecified (0x00000000)
Retransmit time : unspecified (0x00000000)
Source link-layer address: 00:23:5E:6F:B7:D9

Keybase proof

I hereby claim:

  • I am kenyon on github.
  • I am kenyon (https://keybase.io/kenyon) on keybase.
  • I have a public key whose fingerprint is 6166 B557 BF04 3923 AC22 6183 98FF 3EF9 C9B9 12D5

To claim this, I am signing this object: