Skip to content

Instantly share code, notes, and snippets.

View researcx's full-sized avatar
💼
Looking for work

Keira T. researcx

💼
Looking for work
View GitHub Profile
@researcx
researcx / void-linux-install.sh
Last active July 14, 2023 21:10
Minimal instructions for installing Void Linux on MBR + Legacy BIOS
# Obtain the latest Void Linux base live ISO from:
# https://voidlinux.org/download/ (plain musl version)
# Write it to a USB drive:
# sudo dd bs=4M if=void-live-x86_64-musl-20181111.iso of=/dev/sdb status=progress oflag=sync
# Switch to bash (easier to use while installing)
bash
# Set UK keymap
@researcx
researcx / base-weechat-matrix-bitlbee-setup.txt
Created February 1, 2020 23:44
Basics on how to install weechat and (optionally) weechat-matrix and/or bitlbee on Arch Linux
## This is the basics on how to install weechat and (optionally) weechat-matrix and/or bitlbee on Arch Linux
# This does not explain how to set up anything beyond that!
# Refer to https://gist.github.com/unendingPattern/26558dfbfd9417157f20b7c236f28f05 (weechat)
# and https://www.bitlbee.org/user-guide.html#quickstart (bitlbee)
# and https://github.com/poljar/weechat-matrix#configuration (weechat-matrix)
# for further information.
## Not using Arch Linux on your main system? Running a server with LXD containers?
# Create and launch a shell into an Arch Linux LXD container:
@researcx
researcx / redir-uredir-quickbuild.sh
Created February 2, 2020 21:34
redir and uredir quick build
sudo dnf -y groupinstall "Development Tools"
mkdir /src
cd /src
#redir
git clone https://github.com/troglobit/redir.git
cd redir
./autogen.sh
./configure
make -j5
@researcx
researcx / dd-alias.sh
Created April 23, 2020 18:49
bash dd confirmation function/alias for those who need it
function dd () {
local bold=$(tput bold)
local normal=$(tput sgr0)
local red=$(tput setaf 1)
local green=$(tput setaf 2)
local yellow=$(tput setaf 3)
local ddcommand=$(which dd)
local vars=""
@researcx
researcx / luks-encrypt-in-place.sh
Created September 18, 2020 07:46 — forked from samdoran/luks-encrypt-in-place.sh
Encrypt a physical volume using LUKS without erasing the drive.
#!/bin/bash
# Encrypt existing hard drive in place.
# Requires a second physical drive to temporarily store data. This drive will be erased.
# This script is meant to be run on Clonezilla 1.2.9-19 or later.
# The cryptsetup syntax is different in Clonezilla than in Red Hat.
# --- Variables --- #
@researcx
researcx / get-latest-element.sh
Last active September 29, 2020 20:38
element-web auto-updater script
# element-web auto-updater script by unendingPattern ( unendingpattern.github.io )
# fetches the latest element (matrix client) release for self-hosting
# requirements: curl, jq, tar
# cron:
# @hourly /bin/sh /path/to/get-latest-element.sh
# OR
# 0 * * * * /bin/sh /path/to/get-latest-element.sh
# functions
@researcx
researcx / full-backup.sh
Created October 1, 2020 20:52
server backup script for host files and lxd containers (supports backing up into luks images)
#!/bin/bash
#set -x
# configuration
hostname=$(hostname)
lxc="/snap/bin/lxc"
path="/mount/backups/$hostname/"
path_host=$path"host/"
@researcx
researcx / remove all *.log files on system.md
Last active September 10, 2021 20:32
an extremely bad idea indeed

find / -iname "*.log" > /root/scripts/logs.txt

root/scripts/truncate-logs.sh:

#!/bin/bash
FILENAME="/root/scripts/logs.txt"
LINES=$(cat $FILENAME)

for LINE in $LINES
do

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@researcx
researcx / DonateBot.py
Last active August 29, 2022 12:11
video game style chat donate message bot, set it to automatically run on a cron
#!/usr/bin/python
from twisted.words.protocols import irc
from twisted.internet import reactor, protocol
from re import search, IGNORECASE
from random import randint
import time
import os, signal
serv_ip = "10.3.0.50"
serv_port = 6667