Skip to content

Instantly share code, notes, and snippets.

View dsibilly's full-sized avatar

Duane Sibilly dsibilly

View GitHub Profile
@dsibilly
dsibilly / niceLog.py
Last active August 29, 2015 14:06
Print line numbers and time in Python 3
#!/usr/bin/env python3
from datetime import datetime
from inspect import currentframe, getframeinfo
def niceLog(msg):
frameinfo = getframeinfo(currentframe().f_back)
print(" ".join([frameinfo.filename, "Line", str(frameinfo.lineno), datetime.now().strftime("%Y-%m-%d %H:%M:%S"), msg]))
@dsibilly
dsibilly / keybase.md
Last active September 30, 2021 02:47
keybase.md

Keybase proof

I hereby claim:

  • I am dsibilly on github.
  • I am valthonis (https://keybase.io/valthonis) on keybase.
  • I have a public key ASCQbjkocs07jGszg15MHdTMmFXTrH7IPO3gpVExDe0wuQo

To claim this, I am signing this object:

#!/usr/bin/env bash
USER_DIR=/home/steam
ARK_DIR=$USER_DIR/Ark1
SAVE_DIR=$USER_DIR/Ark1/ShooterGame/Saved
STEAMCMD=./steamcmd.sh
STEAMCMD_DIR=$USER_DIR/steamcmd
TEMP_DIR=$USER_DIR/Saved
mv $SAVE_DIR $TEMP_DIR
@dsibilly
dsibilly / sources.list
Created December 31, 2018 18:47
Ubuntu 18.04 Full sources.list
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
@dsibilly
dsibilly / dead_and_bloodied.js
Created January 27, 2021 00:39
Roll20 API script for automatically marking tokens as bloodied or dead
/**
* dead_and_bloodied.js v1.0
* Duane Sibilly <duane@sibilly.com>
*
* Description: Listens for token bar changes to identify when tokens are
* bloodied (reduced to half HP or less) and dead (reduced to 0 HP or less.)
*/
on('ready', () => {
const barNumber = 1, // Set this to the bar you're using for HP: 1, 2, or 3
barObject = { // This represents the bar as an abstract object
@dsibilly
dsibilly / observium_agent_setup.sh
Created February 15, 2022 07:09 — forked from d-a-n/observium_agent_setup.sh
Observium Agent Setup Guide
# CONFIG
SNMP_COMMUNITY=public
SYSCONTACT=dan
SYSLOCATION=Berlin
# get packages
apt-get install snmpd xinetd vim
mkdir -p /opt/observium && cd /opt