Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Stefan Tatschner rumpelsepp

🏠
Working from home
View GitHub Profile
@rumpelsepp
rumpelsepp / update-atom.sh
Last active Nov 26, 2017
A bash script to install and update atom on debian/ubuntu
View update-atom.sh
#!/usr/bin/env bash
#
# The MIT License (MIT)
#
# Copyright (c) 2017 Stefan Tatschner
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@rumpelsepp
rumpelsepp / mkimage.sh
Created Sep 21, 2017
Create a debian qemu image
View mkimage.sh
#!/bin/bash
# Creates a raw image which can be booted with:
#
# $ kvm -kernel PATHTOKERNEL/bzImage \
# -drive file=$HOME/sid-amd64.img,media=disk,format=raw,readonly=off \
# -append "root=/dev/sda console=ttyS0" \
# -fsdev local,id=fs1,path=$HOME,security_model=none \
# -device virtio-9p-pci,fsdev=fs1,mount_tag=host-home \
# -nographic
@rumpelsepp
rumpelsepp / log.c
Last active Nov 8, 2018
A printf wrapper, with loglevel support and timestamps
View log.c
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <time.h>
#include <libiberty/libiberty.h>
#include "log.h"
#include "config.h"
#define BUFSIZE 1024
@rumpelsepp
rumpelsepp / pagemap.c
Last active Mar 24, 2017
Read the pagemap of a given process id
View pagemap.c
// Public Domain; Feel free to copy and steal it!
// Based on:
// http://fivelinesofcode.blogspot.de/2014/03/how-to-translate-virtual-to-physical.html
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
#include <errno.h>
#include <stdint.h>
@rumpelsepp
rumpelsepp / search-deb.sh
Last active Feb 13, 2017
A shell script for using the debian packages search website from the commandline
View search-deb.sh
#!/bin/sh
SCRIPTNAME=$(basename "$0")
KEYWORDS="$1"
SUITE="testing"
usage() {
echo "usage: $SCRIPTNAME [ARGS] [-h] KEYWORDS"
echo ""
echo "This script is a short wrapper over the search feature of the debian"
@rumpelsepp
rumpelsepp / fcd.fish
Created Mar 20, 2016
Fuzzy cd for fish shell using fzf
View fcd.fish
function -d "Fuzzy change directory" fcd
if set -q argv[1]
set searchdir $argv[1]
else
set searchdir $HOME
end
# https://github.com/fish-shell/fish-shell/issues/1362
set -l tmpfile (mktemp)
find $searchdir \( ! -regex '.*/\..*' \) ! -name __pycache__ -type d | fzf > $tmpfile
@rumpelsepp
rumpelsepp / chucknorris.py
Last active Jun 6, 2017
Fetch a random Chuck Norris joke
View chucknorris.py
#!/usr/bin/env python3
#
# The MIT License (MIT)
#
# Copyright (c) 2015-2016 Stefan Tatschner
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@rumpelsepp
rumpelsepp / install-pacaur.sh
Last active Aug 13, 2020
A small script for arch linux which builds and installs "pacaur" automatically
View install-pacaur.sh
#!/usr/bin/bash -l
#
# The MIT License (MIT)
#
# Copyright (c) 2015-2017 Stefan Tatschner
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@rumpelsepp
rumpelsepp / get-n24.py
Last active Feb 23, 2016
A quick and dirty extractor for rtmpdump to download n24 videos, see also: http://anthropophobist.wordpress.com/2013/05/04/rtmp-streams-von-diversen-mediatheken-speichern
View get-n24.py
#!/usr/bin/env python3
#
# The MIT License (MIT)
#
# Copyright (c) 2015 Stefan Tatschner
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
You can’t perform that action at this time.