I hereby claim:
- I am einarjh on github.
- I am einarjh (https://keybase.io/einarjh) on keybase.
- I have a public key whose fingerprint is 4DA1 BF91 DE68 5B78 1552 7782 C5D7 F8B7 5D6F FD72
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# Explanation haiku: | |
# semi-random temp password | |
# easy to remember, type | |
# not very secure | |
function maketemppassword() { | |
part1="$(awk 'length==8' /usr/share/dict/words | grep -v '[^[:alpha:]]' | shuf -n 1 | tr '[:upper:]' '[:lower:]')" | |
part2="$(< /dev/urandom tr -dc 0-9 | head -c${1:-2};echo;)" | |
part3="$(< /dev/urandom tr -dc A-Z | head -c${1:-2};echo;)" | |
echo "${part1}-${part2}_${part3}" | |
} |
################## | |
# Privacy Settings | |
################## | |
# Privacy: Let apps use my advertising ID: Disable | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0 | |
# To Restore: | |
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1 | |
# Privacy: SmartScreen Filter for Store Apps: Disable | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0 |
function makethumbnail() { | |
filename="$(basename ${1} .mp4)" | |
# Use the wadsworth constant to set the time when we want the thumbnail from | |
# http://knowyourmeme.com/memes/the-wadsworth-constant | |
wadsworth=$(echo "${2} * 0.3 / 1 * 60" | bc) | |
echo "INFO: Creating thumbnail for ${1} by skipping ${wadsworth} seconds ahead." | |
if [ ! -f ${filename}.jpg ]; then | |
${FFMPEGPATH}/ffmpeg -loglevel ${LOGLEVEL} -ss ${wadsworth} -i ${1} -vframes 1 -an ${filename}.jpg | |
if [ "${?}" -ne 0 ]; then | |
echo "ERROR: Creation of thumbnail for ${1} failed." |
[Unit] | |
Description=Minecraft Server | |
[Service] | |
# Adjust these to your liking, the service assumes that minecraft_server.jar and eula.txt already | |
# exists in this directory, and that the User specified has write access to the WorkingDirectory | |
# | |
# To send commands to minecraft, do: | |
# echo "command" >> minecraft-input |
#!/bin/bash | |
export LC_ALL=en_US.utf-8 | |
Repo="username@remote:path" # Path to premade remote repo, preferably with encryption | |
Backupdir="/path/to/backup" # Same as exportdir in zcash.conf | |
Date="$(date +%Y-%m-%d)" | |
Options="--compression lz4 --chunker-params 19,23,21,4095" | |
zcash-cli z_exportwallet keysbackup | |
zcash-cli backupwallet walletbackup |
iface eth0 inet6 static | |
address 2001:700:1d00:beef::13 | |
netmask 64 | |
gateway 2001:700:1d00:beef::1 | |
accept_ra 0 | |
privext 0 |
# This unit file is suitable for running as a normal user, as a user unit | |
# I.e. put the file in $HOME/.config/systemd/user and do systemctl --user daemon-reload | |
# Then start it with systemctl --user start minecraft.service | |
# Your user needs permission to run units while not logged in (linger): | |
# sudo systemctl enable-linger <your user> | |
[Unit] | |
Description=Minecraft Server | |
After=network.target |
# Save as ~/.config/systemd/user/weechat.service | |
# Remember that you need to allow background processes to keep running | |
# even when there are no interactive sessions: | |
# sudo loginctl enable-linger username | |
# And then: | |
# systemctl --user daemon-reload && systemctl --user --now enable weechat.service | |
[Unit] | |
Description=weechat session | |
After=bitlbee.service |
minecraft@minecraft:~$ cat bin/getlatestminecraftsnapshot.bash | |
#!/bin/bash | |
# A quick and dirty script to fetch the latest minecraft snapshot for multicraft | |
cd ~/multicraft/jar | |
VERSION_URL="https://launchermeta.mojang.com/mc/game/version_manifest.json" | |
LATEST_VER=$(wget -qO - "${VERSION_URL}" | jq -r .latest.snapshot) | |
# Our CURRENT_VER is stored in current_ver and we don't need no stinking error messages | |
source current_snap > /dev/null 2>&1 |