Skip to content

Instantly share code, notes, and snippets.

View DerBunman's full-sized avatar
🍌
Focusing

DerBunman

🍌
Focusing
View GitHub Profile
@DerBunman
DerBunman / cookiebanner-go-away.user.js
Last active September 30, 2020 11:31 — forked from BlaM/cookiebanner-go-away.user.js
Get rid of EU Cookie Banners (Tampermonkey)
// ==UserScript==
// @name Get rid of EU Cookie Banners
// @namespace http://blog.deobald.org/
// @description Get rid of EU Cookie Banners
// @license http://creativecommons.org/licenses/by-nc-sa/3.0/
// @downloadURL https://gist.github.com/DerBunman/12f6a1f079a844e979b4a2b081c3fae4/raw/95366831b11e17cb9e3207567c7ca68250edf93c/cookiebanner-go-away.user.js
// @updateURL https://gist.github.com/DerBunman/12f6a1f079a844e979b4a2b081c3fae4/raw/95366831b11e17cb9e3207567c7ca68250edf93c/cookiebanner-go-away.user.js
// @homepage https://gist.github.com/BlaM/6d826d6e9d77d2d77bf9a92fdad55788
// @version 0.3.4-1
// @author Dominik Deobald
@DerBunman
DerBunman / Tortellini_Auflauf.md
Last active May 7, 2020 13:29
Tortellini Auflauf

Tortellini Auflauf

Zutaten

Basis:

  • 2x 400g vorgekochte Tortellini Spinat Ricotta
  • 1 Hand Rucola

Soße

  • 1 Becher Sahne
@DerBunman
DerBunman / print256colours.sh
Created November 16, 2019 10:37 — forked from HaleTom/print256colours.sh
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256
@DerBunman
DerBunman / README.md
Last active August 11, 2019 19:51
rofi ffmpeg screenrecorder prototype

rofi ffmpeg screenrecorder

This script provides a mode for rofi which gives you the commands to create screenshots and videos from your favorite terminal windows. (Other windows are also no problem, but who cares about gui windows.)

TODO

  • file=$HOME/Videos/screencast*(om[1]) is a bit hacky
  • cleanup code (this is a prototype)
  • right now the script will try to upload every new video to streamable
  • a indicator somewhere that a recording is running
  • make configuration editable via rofi: eg streamable upload, ffmpeg parameters
@DerBunman
DerBunman / gist:88f85eb63f0b71f8a5271c2081a3e76b
Last active December 4, 2022 05:41
Build zsh 5.5.1 on Ubuntu 18.04
# based on this post
# https://askubuntu.com/questions/770733/how-to-install-package-from-testing
# install build tools
sudo apt-get install moreutils build-essential fakeroot devscripts dpkg-dev equivs
# create some build directory
mkdir build
cd build
@DerBunman
DerBunman / header.vim
Created July 13, 2019 18:02
sticky header in vim
:set scrollopt+=hor
:set scrollopt-=ver
:set nowrap
:1split
:windo set scrollbind
@DerBunman
DerBunman / heading.zsh
Created July 13, 2019 18:02
sticky header test
#!/usr/bin/env zsh
#trap 'tput csr 0 "$((LINES-1))"' INT
tput csr "2" "$((LINES-1))"
tput clear
echo CORNERTEXT
echo ${(r:${COLUMNS}::=:)${}}
tput rc
for i in {1..200}; do
tput sc
@DerBunman
DerBunman / i3winsplit.zsh
Last active July 16, 2019 02:00
start './i3winsplit.zsh xbindkeys" then cut windows like a man with right mouse and ctrl and a cutting motion
#!/usr/bin/env zsh
# terminal to launch when splitting
# undefined window class.
# first choice urxvt fallback xterm.
terminal="${commands[urxvt]:-xterm}"
typeset -a allowed_actions=(
xbindkeys
start
#!/usr/bin/env zsh
# _ _
# __ _| | _____ _ _ ___ _______| |__
# \ \/ / |/ / _ \ | | / __| |_ / __| '_ \
# > <| < __/ |_| \__ \_ / /\__ \ | | |
# /_/\_\_|\_\___|\__, |___(_)___|___/_| |_|
# |___/
last_class="none"
current_map=default
@DerBunman
DerBunman / gist:1b0d6d163008faebddfb0caf6b235c30
Last active June 10, 2019 15:43
zsh: cleanup mktemp files on script exit/term
#!/usr/bin/env zsh
MKTEMP_BIN="$(which mktemp)"
tempfiles="$(mktemp)"
function mktemp(){
local filename="$($MKTEMP_BIN "${@}")"
echo "$filename" >> "$tempfiles"
echo "$filename"
}
function on_exit() {
test -f "$tempfiles" && {