Skip to content

Instantly share code, notes, and snippets.

View jgru's full-sized avatar

Jan jgru

View GitHub Profile
@jgru
jgru / Dockerfile
Last active February 21, 2023 15:29
jgru/latex
# Base image
FROM debian:bullseye-slim
# Install make
RUN apt-get update && \
apt-get install --yes make && \
apt-get install --yes wget && \
apt-get install --yes patch
# TeX environment
@jgru
jgru / create_publishable_tarball.sh
Created December 14, 2022 13:19
Helper script to create a publishable tarball containing all the TeX-sources
#!/bin/bash
PROJ="paper-724_"
INDIR="final/"
OUTDIR="$(date +%Y-%m-%d)_${PROJ}"
CWD="$(pwd)"
ARCH=".zip" # or .tar.gz
# Create tmp directory
TMP=$(mktemp -d)
@jgru
jgru / publications-jgru.bib
Last active October 31, 2023 08:45
Publication list
@article{SchmitzG17,
doi = {10.1155/2017/5879257},
url = {https://doi.org/10.1155%2F2017%2F5879257},
year = {2017},
publisher = {Hindawi Limited},
volume = {2017},
pages = {1--10},
author = {Roland Schmitz and Jan Gruber},
title = {Commutative Watermarking-Encryption of Audio Data with Minimum Knowledge Verification},
journal = {Advances in Multimedia}
@jgru
jgru / PDF_file_icon.svg
Last active September 3, 2022 16:04
PDF Icon as svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jgru
jgru / reg-triage.org
Created August 28, 2022 09:37
Run Automated Registry Triage on an EWF-image

Run Automated Registry Triage on an EWF-image

Define path to image

IMG="./nps-2008-jean.E01"
WINPARTS=""
@jgru
jgru / auditd_ruleset.py
Created April 12, 2022 07:47
Helper functions to create auditd-rulesets
import subprocess
from enum import Enum
class AuditAction(str, Enum):
always = "always"
never = "never"
def __str__(self):
return str.__str__(self)
@jgru
jgru / readme.org
Created April 12, 2022 07:45
Communicate with a KVM/QEMU-VM via serial console

How to use serial_comm.py

Connect to a console

URI = "qemu+ssh://user@192.168.178.180/system?keyfile=/home/user/.ssh/id_rsa"
domain = "d10c"
user = "root"
pw = "pwd"
@jgru
jgru / build-bios-based-debian-vm.sh
Last active April 3, 2022 12:57
Scripts using debootstrap to build Debian-based VMs
#!/bin/bash
clean_debian() {
[ "$MNT_DIR" != "" ] && chroot $MNT_DIR umount /proc/ /sys/ /dev/
sleep 1s
[ "$MNT_DIR" != "" ] && umount -l $MNT_DIR
sleep 1s
[ "$DISK" != "" ] && qemu-nbd -d $DISK
sleep 1s
[ "$MNT_DIR" != "" ] && rm -r $MNT_DIR
@jgru
jgru / Makefile
Last active November 9, 2022 15:38
Makefile template for TeX-document
# Author:
# jgru
# Copyright:
# Copyright (c) 2022 jgru
# Define document to build
MAINFILE = draft
# Include sources in subdirectories eventually
TEX_SOURCES := $(MAINFILE).tex $(wildcard */*.tex)
@jgru
jgru / toS3.py
Created December 21, 2021 06:01
Helper script to upload `STDIN` directly to AWS S3 storage by utilizing `boto`
#!/usr/bin/env python3
# Perform a multipart upload to Amazon S3 of data read from stdin.
#
# Example usage:
# tar -C / -cpjO /home | toS3 -k aws.key -b com-example-backup -o home.tar.bz2
#
# Originally authored from
# https://www.vennedey.net/blog/1-Pipe-data-from-STDIN-to-Amazon-S3
# Adapted to python3