Skip to content

Instantly share code, notes, and snippets.

View Maddosaurus's full-sized avatar

Matthias Maddosaurus

View GitHub Profile
@Maddosaurus
Maddosaurus / .vimrc
Last active August 29, 2015 14:18
vimrc
" Based on Doug Black's blogpost: http://dougblack.io/words/a-good-vimrc.html
" Mentioned color scheme: https://github.com/sjl/badwolf/
colorscheme badwolf " awesome colorscheme
syntax enable " enable syntax processing
set tabstop=4 " number of visual spaces per TAB
set softtabstop=4 " number of spaces in tab when editing
set expandtab " tabs are spaces
set number " show line numbers
set showcmd " show command in bottom bar
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#ZSH_THEME="robbyrussell"
ZSH_THEME="pygmalion" #war schon echt gut
@Maddosaurus
Maddosaurus / pytwit.py
Created June 6, 2016 21:08
Snakes on a Twitter
# easy_install twitter
from twitter import *
token = ACCESS_TOKEN
token_key = ACCESS_TOKEN_SECRET
con_secret_key = CONSUMER_SECRET
con_secret = CONSUMER_KEY
t = Twitter(auth=OAuth(token, token_key, con_secret, con_secret_key))
@Maddosaurus
Maddosaurus / readme.md
Last active February 11, 2023 14:51
Dual Boot Arch & Windows 10 - Both fully encrypted on the same disk

Fully encrypting a multiboot-installation with TrueCrypt/VeraCrypt is unfortunately not possible ATM.
Also, chainloading an ISO in GRUB is not working, so it's kind of complicated to get FDE (Full Disk Encryption) working in a multiboot single drive configuration.

1 - Do a Windows 7/8/10/x basic (unencrypted) install

Not much to say here. Basic install with all your desired settings. But wait with wireless, passwords, setup & stuff.
Just let it use 50%(?) of your available space and let it create its recovery volume.

2 - Install Arch Linux with dm-crypt

TL;DR: 100MB /boot, 50% I followed the articles from the german Arch wiki here and here (first one is available in english, too).

@Maddosaurus
Maddosaurus / GDB.md
Last active October 7, 2016 12:33
Debugger Cheatsheets
command reference
disassemble func name
break *address
r args & c run with args (< /path/to/file.txt works too) or continue
si continue 1 step
define hook-stop -> x/24wx $esp \n w/2i $eip \n end set up breakpoint hook
x/wx $esp+0x5x examine content of this var
set environment varname [ = value] set environment var with optional value
@Maddosaurus
Maddosaurus / README.MD
Created October 17, 2016 10:44
Scaling stuff

Scaling with HiDPI - the nice way

  1. Set biggest display to smaller resolution
    vim .config/i3/config
exec  xrandr --output eDP1 --mode 1920x1080
  1. Set up Xresources correctly to respect DPI and mouse cursor size settings
    vim ~/.Xresources
@Maddosaurus
Maddosaurus / Alternative_Keypad.md
Last active February 9, 2021 01:02
Binding Multimedia keys in i3

Alternative bindings for the 540p using pactl and i3 - Keyboard

 # set laptop display to lower res - thats better
 exec  xrandr --output eDP1 --mode 1920x1080
 
 # set Numlock to on at login time
 exec --no-startup-id numlockx on
 
 # start pidgin on launch
@Maddosaurus
Maddosaurus / notes.md
Created October 20, 2016 06:44
Feh BG stuff

Either use feh from the command line:
feh --bg-scale --randomize ~/Pictures
This will put a different backgfround image on every monitor.

@Maddosaurus
Maddosaurus / howto.sh
Created October 21, 2016 21:13
Create OPenVPN cert
# become root
sudo su -
# change dir to easy rsa
cd /etc/openvpn/easy-rsa
# source the environment vars
source ./vars
# create a new cert
@Maddosaurus
Maddosaurus / telegraf.conf
Created February 25, 2017 12:18
Telegraf speedtest-cli exec
#### WARNING ####
# POC SAMPLE CONFIG! NEVER USE IN PROD!
#
# Telegraf Configuration
#
# Telegraf is entirely plugin driven. All metrics are gathered from the
# declared inputs, and sent to the declared outputs.
#