Skip to content

Instantly share code, notes, and snippets.

# ,-------------------------------------- Minute [0,59]
# | ,------------------------------ Hour [0,23]
# | | ,---------------------- Day of the month [1,31]
# | | | ,-------------- Month of the year [1,12]
# | | | | ,------ Day of the week ([0,6] with 0=Sunday)
# | | | | |
URxvt.scrollBar: false
URxvt.internalBorder: 0
URxvt.font: xft:DejaVuSansMono:size=9.4:antialias=true
URxvt.boldFont: xft:DejaVuSansMono:bold:size=9.4:antialias=true
URxvt.saveLines: 1000
URxvt.color0: #000000
URxvt.color1: #b21818
URxvt.color2: #18b218
URxvt.color3: #b26818
@nrdmn
nrdmn / .Xmodmap
Last active October 14, 2017 08:33
us-intl-de
keycode 14 = 5 percent EuroSign EuroSign eacute Eacute
keycode 24 = q Q adiaeresis Adiaeresis aacute Aacute
keycode 26 = e E eacute Eacute EuroSign EuroSign
keycode 29 = y Y udiaeresis Udiaeresis uacute Uacute
keycode 30 = u U uacute Uacute udiaeresis Udiaeresis
keycode 32 = o O oacute Oacute odiaeresis Odiaeresis
keycode 33 = p P odiaeresis Odiaeresis oacute Oacute
keycode 38 = a A aacute Aacute adiaeresis Adiaeresis
keycode 94 = less greater less greater bar bar
@nrdmn
nrdmn / mandelbrot.c
Created July 7, 2017 11:23
mandelbrot
#include <math.h>
#include <stdio.h>
#ifndef EXAMPLE
#define EXAMPLE 0
#endif
#ifndef ACCURATE
#define ACCURATE 1
#endif
@nrdmn
nrdmn / ipcollapse.py
Last active February 9, 2024 13:57
collapse a list of IP addresses
#!/usr/bin/python3
# reads a list of IP subnets in CIDR notation from stdin and collapses it
import sys
import ipaddress
subnets6 = []
subnets4 = []
input_list = sys.stdin.readlines()
@nrdmn
nrdmn / color-ip.sh
Created July 7, 2017 11:21
color IP addresses
#!/bin/sh
# colors IP addresses
grep -a --color=always -E "((0|1{0,1}[0-9]{1,2}|2[0-4][0-9]|25[0-5])\.){3}(0|1{0,1}[0-9]{1,2}|2[0-4][0-9]|25[0-5])|(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))|$" $1