Skip to content

Instantly share code, notes, and snippets.

View ph0llux's full-sized avatar
🦀
Sometimes available - sometimes not.

ph0llux

🦀
Sometimes available - sometimes not.
View GitHub Profile
@ph0llux
ph0llux / zshrc
Last active January 13, 2023 11:50
My personal zshrc config.
##########################################################################
# written and published by plitc (2013)
# heavily modified by ph0llux (2022)
setopt ALL_EXPORT # export all parameters automatically
# --------------------------------------------------------------------
# History & Environment
# --------------------------------------------------------------------
#!/bin/bash
# This script requires sipcalc (or you have to enter the ipv6 prefix manually
### To edit:
WGS_ETC="/etc/wireguard"
WG_IF="wg0"
WG0_CONF="$WGS_ETC/$WG_IF.conf"
WG_IF_DIR="$WGS_ETC/$WG_IF"
FQDN="mysuperduper.domain.com"
@ph0llux
ph0llux / gen_testimage
Last active May 7, 2022 18:24
Generate an image with testdata
#!/bin/bash
MOUNTDIR="/tmp/example01";
ISO_MOUNTDIR="/tmp/isofile";
ISO_DOWNLOAD_FILE="https://cdimage.debian.org/cdimage/archive/11.2.0/amd64/iso-dvd/debian-11.2.0-amd64-DVD-1.iso"
USER="ph0llux";
PWD=$(pwd);
#create the example image and mount it.
dd if=/dev/zero of=example01.dd count=10485760 bs=2048 status=progress;
#!/bin/bash
if [ -e /etc/portage/make.conf ]; then
. /etc/portage/make.conf
if [ ! -d $PORTDIR/metadata/md5-cache -o -d $PORTDIR/.git ]; then
echo "updating metadata cache ..."
egencache --repo=gentoo --update
fi
fi
/usr/bin/eix-update