Skip to content

Instantly share code, notes, and snippets.

@pranavashok
pranavashok / fritzbox_dns.md
Created July 2, 2022 14:19 — forked from fspoettel/fritzbox_dns.md
Pi-Hole setup with a FritzBox!

This config sets up our Pi-Hole for the local network and the guest network while preserving proper host names in the query log.

See here for more context and other possible configuration.

FritzBox!

  1. Internet > Zugangsdaten > DNS Server
DNSv4-Server
@pranavashok
pranavashok / userChrome.css
Created June 6, 2021 21:29
Custom firefox style to improve the appearance on Firefox 89+
/*
* Follow instructions on https://www.userchrome.org/ to create a chrome
* folder inside your Firefox profile and place this file inside the folder.
*/
/*
* remove dead space in browser tabs bar
*
* Source: https://news.ycombinator.com/item?id=27395448
*/
@pranavashok
pranavashok / dd-test.sh
Created April 25, 2021 19:53
Script to figure out what block size to use in dd
#!/bin/bash
# Credits: https://github.com/tdg5/blog/blob/master/_includes/scripts/dd_obs_test.sh
# Originally described: https://stackoverflow.com/a/27772496/232932
# Since we're dealing with dd, abort if any errors occur
set -e
TEST_FILE=${1:-dd_obs_testfile}
TEST_FILE_EXISTS=0
@pranavashok
pranavashok / launch_multi.sh
Last active January 23, 2021 00:03
Launch polybar on a multi-monitor setup, with eDP* being the laptop monitor and HDMI* being the external monitor. The primary bar is placed on the external monitor if available and the secondary goes to laptop screen.
#!/bin/bash
# This script can either be launched from within your i3 config
# exec_always --no-startup-id $HOME/.config/polybar/launch_multi.sh
# or else called from a acpid event handler script (triggered when an
# external monitor is connected or laptop lid status changes). For example,
# this script can be called as 'su -c username launch_multi.sh' at the end
# of https://gist.github.com/pranavashok/93c596fd94368e1064b81a9aac5ed6c9.
echo "Closing existing bars..."
@pranavashok
pranavashok / display-switcher.sh
Last active January 22, 2021 23:24
Automatically call xrandr to manage hotplugging of displays
#!/bin/bash
# Save this file as /etc/acpi/display-switcher.sh and chmod +x it
# Run
# su -c 'echo "event=button/lid.*\naction=/etc/acpi/display-switcher.sh %e" >> /etc/acpi/events/lid'
# in order to create an acpid event handler which calls /etc/acpi/display-switcher.sh
# when a lid event is encountered
# Restart the acpid service: sudo systemctl restart acpid
@pranavashok
pranavashok / install-kubernetes-archlinux.md
Last active February 5, 2020 18:18 — forked from StephenSorriaux/install-kubernetes-archlinux.md
Install Kubernetes on bare-metal ArchLinux host

Installing Kubernetes on ArchLinux

Packages

pacman -S curl docker ebtables ethtool wget unzip

Also cfssl is needed but available on AUR, using pacaur

pacaur -S cfssl
../../../prism/bin/prism -ex ../models/badforbrtdp/branch_zeroconf.nm -pf Pmax=?[ F (l=4 & ip=1) ] -timeout 900 -heuristic_epsilon 1e-4 -const err=0.1,K=10,N=1,reset=false -heuristic BRTDP -next_state MAX_DIFF -heuristic_verbose
BRTDP_MAXDIFF | None | 1 | 10 | 46.716 | 5.060 | 5.059 | 30019525.000 | 60348058.000000000 | 0.000000000 | 0.000000000 | 81.000 | 0 | 0
../../../prism/bin/prism -ex ../models/badforbrtdp/branch_zeroconf.nm -pf Pmax=?[ F (l=4 & ip=1) ] -timeout 900 -heuristic_epsilon 1e-4 -const err=0.1,K=10,N=1,reset=false -ucb1constant 1 -heuristic MCTS_BRTDP -heuristic_verbose -next_state MAX_DIFF
MCTS_BRTDP_MAXDIFF | 1.000 | 1 | 10 | 85.400 | 2.654 | 2.654 | 18400673.500 | 61616216.500000000 | 0.000000000 | 0.000000000 | 3535.000 | 0 | 0
../../../prism/bin/prism -ex ../models/badforbrtdp/branch_zeroconf.nm -pf Pmax=?[ F (l=4 & ip=1) ] -timeout 900 -heuristic_epsilon 1e-4 -const err=0.1,K=10,N=1,reset=false -ucb1constant 1 -heuristic MCTS_BRTDP -h
../../../prism/bin/prism -ex ../models/badforbrtdp/branch_firewire.nm -pf Pmax=? [ F ((s1=8)&(s2=7))|((s1=7)&(s2=8)) ] -timeout 1200 -heuristic_epsilon 1e-4 -const fast=0.25,delay=1440 -heuristic BRTDP -next_state MAX_DIFF -heuristic_verbose
BRTDP_MAXDIFF | None | 1440 | 0.25 | 0.068 | 0.008 | 0.004 | 14.400 | 730.200000000 | 1.000000000 | 1.000000000 | 669.200 | 0 | 0
../../../prism/bin/prism -ex ../models/badforbrtdp/branch_firewire.nm -pf Pmax=? [ F ((s1=8)&(s2=7))|((s1=7)&(s2=8)) ] -timeout 1200 -heuristic_epsilon 1e-4 -const fast=0.25,delay=1440 -ucb1constant 0.5 -heuristic MCTS_BRTDP -heuristic_verbose -next_state MAX_DIFF
MCTS_BRTDP_MAXDIFF | 0.500 | 1440 | 0.25 | 0.071 | 0.012 | 0.006 | 12.000 | 877.400000000 | 1.000000000 | 1.000000000 | 674.600 | 0 | 0
../../../prism/bin/prism -ex ../models/badforbrtdp/branch_firewire.nm -pf Pmax=? [ F ((s1=8)&(s2=7))|((s1=7)&(s2=8)) ] -timeout 1200 -heuristic_epsilon 1e-4 -const fast=0.25,delay=1440
@pranavashok
pranavashok / wlan6_15-11-2017_17-48.log
Created November 16, 2017 09:37
firewire_15-11-2017_17-48.log
../../../prism/bin/prism -ex ../models/firewire/impl/firewire.nm -pf Pmax=? [ F ((s1=8)&(s2=7))|((s1=7)&(s2=8)) ] -timeout 900 -const fast=0.25,delay=1440 -heuristic BRTDP -next_state MAX_DIFF -heuristic_verbose
BRTDP_MAXDIFF | None | 1440 | 0.25 | 0.062 | 0.011 | 0.009 | 7.125 | 717.875000000 | 1.000000000 | 1.000000000 | 618.625 | 0 | 0
../../../prism/bin/prism -ex ../models/firewire/impl/firewire.nm -pf Pmax=? [ F ((s1=8)&(s2=7))|((s1=7)&(s2=8)) ] -timeout 900 -const fast=0.25,delay=1440 -ucb1constant 0.5 -heuristic MCTS_BRTDP -heuristic_verbose -next_state MAX_DIFF
MCTS_BRTDP_MAXDIFF | 0.500 | 1440 | 0.25 | 0.062 | 0.006 | 0.008 | 9.375 | 739.500000000 | 1.000000000 | 1.000000000 | 617.375 | 0 | 0
../../../prism/bin/prism -ex ../models/firewire/impl/firewire.nm -pf Pmax=? [ F ((s1=8)&(s2=7))|((s1=7)&(s2=8)) ] -timeout 900 -const fast=0.25,delay=1440 -ucb1constant 1 -heuristic MCTS_BRTDP -heuristic_verbose -next_state MAX_DIFF
MCTS_BRTDP_
@pranavashok
pranavashok / .block
Created November 12, 2017 13:21 — forked from mbostock/.block
Collapsible Tree
license: gpl-3.0