View lockable_script_boilerplate.sh
#!/bin/bash
## Copyright (C) 2009 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the MIT license.
## https://opensource.org/licenses/MIT
#
# Lockable script boilerplate
### HEADER ###
View tc-delaydnsreqs.sh
#!/bin/sh
## Traffic control - Make DNS requests delayed and low priority on Linux.
## Author: Przemyslaw Pawelczyk
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo "Usage: $0 IFACE [DELAY [JITTER [CORRELATION]]]"
echo
echo "Example: $0 eth1 500ms 100ms"
exit 0
View preferences
Package: *
Pin: release n=jessie-backports
Pin-Priority: 800
Package: *
Pin: release n=jessie-updates
Pin-Priority: 700
Package: *
Pin: release n=jessie
View 02-protip-instagram.md

Przemoc's protip (2017-08): Improve the way you upload photos to Instagram

Tired of sending photos to your phone just to share them on Instagram?

I would be too! Just use Google Chrome and visit instagram.com on your desktop PC/Mac. Yes, no need for 3rd party Instagram clients!

Go to Developer Tools (F12 or Ctrl+Shift+I), toggle device toolbar (Ctrl+Shift+M) and choose the screen to emulate or Responsive.

View 01-protip-youtube.md

Przemoc's protip (2017-08): Improve YouTube experience

Aren't you tired of overlays showing at the end of vids that hide content?

Me too! I figured out two easy solutions:

  1. Go to Developer Tools (F12 or Ctrl+Shift+I) and run following code in Console:

     $$(".ytp-ce-element").forEach(function(el){el.style.display="none"})
    
View 10-trackpoint.rules
### default values: sensitivity=128, speed=97
ACTION=="add", SUBSYSTEM=="input", ATTR{name}=="TPPS/2 IBM TrackPoint", ATTR{device/sensitivity}="196", ATTR{device/speed}="255"
View gitio
#!/bin/sh
# Usage: gitio URL [CODE]
#
# Turns a github.com URL
# into a git.io URL
#
# Copies the git.io URL to your clipboard if xclip is available.
URL="$1"
View ssh-root-without-password-on-freebsd.md

ssh root without password on FreeBSD

If you have some toy boards in your internal network, then you can happily live without password and key. As I learned today, setting following stuff in /etc/ssh/sshd_config is not enough:

PermitRootLogin yes
PermitEmptyPasswords yes
View reassemble_arguments.sh
#!/bin/sh
## Reassemble arguments (support-most-cases implementation)
## Author: Przemyslaw Pawelczyk
ARGC=$#
argcon=
argkey=
argval=
while [ $ARGC -gt 0 ]; do
View tmux-vm.sh
#!/bin/sh
LDIR="$HOME/qemu"
KDIR="$LDIR/$1"
if [ -z "$1" -o ! -d "$KDIR" ]; then
echo "Please specify existing kernel directory under $LDIR"
exit 1
fi