Skip to content

Instantly share code, notes, and snippets.

ansemjo

Block or report user

Report or block ansemjo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ansemjo
ansemjo / openwrtbuilder
Last active Jul 26, 2019
OpenWRT builder - using the imagebuilder to compile a custom image
View openwrtbuilder
#!/usr/bin/env bash
set -e
RELEASE="snapshot"
TARGET="ar71xx/generic"
PROFILE="archer-c7-v2"
PACKAGES="-ppp -ppp-mod-pppoe luci-ssl wireguard"
DESTINATION=~/Downloads
LISTONLY=no
@ansemjo
ansemjo / container-systemd-autologin.conf
Created Apr 26, 2019
enable root autologin when starting a container with systemd init
View container-systemd-autologin.conf
# drop-in override to fix and enable autologin in rootless containers with systemd init
# e.g.:
#
# podman run --rm -it \
# -v .../container-systemd-autologin.conf:/etc/systemd/system/console-getty.service.d/override.conf:ro \
# centos:latest /usr/lib/systemd/systemd
[Service]
ExecStart=
ExecStartPre=-/usr/bin/sed -i '/pam_loginuid.so/d' /etc/pam.d/login
@ansemjo
ansemjo / aur-package-hooks.md
Last active Apr 17, 2019
Git hooks for AUR package repositories to test your PKGBUILD before pushing.
View aur-package-hooks.md

AUR package hooks

These hooks are meant to be used in Git repositories that track PKGBUILD files for the Arch User Repository. Place them in .git/hooks/pre-{commit|push} and make sure they're executable.

pre-commit

This hook simply updates the .SRCINFO before every commit by running:

@ansemjo
ansemjo / german_letter_template.tex
Created Feb 7, 2019
Deutscher DIN Brief für Umschläge mit Sichtfenster
View german_letter_template.tex
% write a letter
\documentclass[
11pt, ngerman,
version=last,
firsthead=false,
firstfoot=false,
foldmarks=true,
DIV=15,
parskip=half,
locfield=wide,
@ansemjo
ansemjo / docker-compose.yml
Created Feb 2, 2019
simple docker compose to self-host the firefox send experiment
View docker-compose.yml
version: "3"
services:
send:
image: mozilla/send:latest
links:
- redis
ports:
- "127.0.0.1:1443:1443"
environment:
- REDIS_HOST=redis
@ansemjo
ansemjo / haveibeepwned.sh
Created Jan 17, 2019
check passwords for matches in haveibeenpwned database
View haveibeepwned.sh
#!/usr/bin/env bash
# script by reddit.com/u/zfa, with modifications to allow piping on stdin and change output format
# https://old.reddit.com/r/netsec/comments/agrrig/troy_hunt_the_773_million_record_collection_1/ee9jenv/
haveibeenpwned() {
printf '\033[1m%-40s\t%9s\t%s\033[0m\n' 'sha1 hash' '# hits' 'password'
while read -r password; do
@ansemjo
ansemjo / embed_ignition.sh
Created Jan 3, 2019
Embed CoreOS ignition configuration in the released OVA for easy deployment of multiple instances on VMware.
View embed_ignition.sh
#!/usr/bin/env bash
# Copyright (c) 2019 Anton Semjonov
# Licensed under the MIT License
# This script embeds a transpiled ignition (JSON) config in the CoreOS OVA
# as guestinfo parameters, so you can deploy several machines with the
# same configuration easily.
# required arguments / inputs
@ansemjo
ansemjo / lxsetup.ps1
Created Dec 20, 2018
Install and update Lexware Warenwirtschaft premium via GPO startup scripts
View lxsetup.ps1
# Install & update Lexware Warenwirtschaft Premium in server/client-setup at startup via GPO startup scripts.
# This should update the Lexware client whenever you update the server, without needing to login to every single
# computer in the domain with Administrator credentials.
# registry persistence path and Lexware setup path
$REG = "HKLM:\Software\myCorp"
$LEX = "\\LEXWARE\lexware_premium_setup"
$APP = "warenwirtschaft premium"
# get current version from payload xml
@ansemjo
ansemjo / seccheck.sh
Last active Sep 27, 2018
wrapper for slimm609/checksec.sh which displays nicer-formatted output
View seccheck.sh
#!/usr/bin/env bash
# wrapper script for slimm609/checksec.sh for nicer output format
# download https://github.com/slimm609/checksec.sh/blob/master/checksec to PATH
# further requires jq and objdump in PATH
CHECKSEC=checksec
set -e
# version information
@ansemjo
ansemjo / openwrt_profile
Last active Apr 19, 2019
ash profile for OpenWRT devices
View openwrt_profile
#!/bin/ash
# banners
[ -f /etc/banner ] && cat /etc/banner
[ -e /tmp/.failsafe ] && cat /etc/banner.failsafe
fgrep -sq '/ overlay ro,' /proc/mounts && {
echo 'Your JFFS2-partition seems full and overlayfs is mounted read-only.'
echo 'Please try to remove files from /overlay/upper/... and reboot!'
}
You can’t perform that action at this time.