I hereby claim:
- I am alexjj on github.
- I am alexjj (https://keybase.io/alexjj) on keybase.
- I have a public key whose fingerprint is 8B9B 891B 7CB8 D401 E268 068D 0EDC 6376 B245 2245
To claim this, I am signing this object:
| #!/bin/bash | |
| set -e | |
| playlistdir=/var/lib/mpd/playlists | |
| declare -A radios | |
| radios["BBC Radio 4"]="http://www.bbc.co.uk/radio/listen/live/r4_aaclca.pls" | |
| radios["BBC Radio 2"]="http://www.bbc.co.uk/radio/listen/live/r2_aaclca.pls" | |
| for k in "${!radios[@]}" | |
| do |
| #This script allows an EncFS password to be stored in KDE’s kwallet. This is useful for anyone who has encrypted parts of their #harddrive and want them to be automatically mounted when logging on to KDE. On the first run, a dialogue will allow the password #to be stored in kwallet; subsequently, the kwallet password will be requested (if kwallet is not already authenticated) and then #the encrypted directory will be automatically mounted. The script has not been tested on recent versions of KDE, but it is known #to have worked in versions 4.2 and 4.3. | |
| #Usage | |
| #kdeencfs ROOTDIR MOUNTPOINT | |
| #The call to kdeencfs can be placed in a file located in ~/.kde/Autostart: | |
| # mount my private directories | |
| kdeencfs /home/ben/.private /home/ben/private | |
| kdeencfs /mnt/data/.secret /home/data/secret |
| # ex - archive extractor | |
| # usage: ex <file> | |
| ex () | |
| { | |
| if [ -f $1 ] ; then | |
| case $1 in | |
| *.tar.bz2) tar xjf $1 ;; | |
| *.tar.gz) tar xzf $1 ;; | |
| *.bz2) bunzip2 $1 ;; | |
| *.rar) unrar x $1 ;; |
| PIDFILE=/home/alex/radio.pid | |
| if [ -e "$PIDFILE" ] ; then | |
| PID=`/bin/cat "$PIDFILE"` | |
| if /bin/kill -0 "$PID" > /dev/null 2>&1 ; then | |
| exit 0 | |
| fi | |
| fi | |
| /bin/echo "$$" > $PIDFILE |
| zfs list -H -o name -t snapshot | xargs -n1 zfs destroy |
I hereby claim:
To claim this, I am signing this object:
| autoconf | |
| automake | |
| bash | |
| binutils | |
| bison | |
| bzip2 | |
| coreutils | |
| cryptsetup | |
| device-mapper | |
| dhcpcd |
| # Note | |
| note () { | |
| # if file doesn't exist, create it | |
| if [[ ! -f $HOME/.notes ]]; then | |
| touch "$HOME/.notes" | |
| fi | |
| if ! (($#)); then | |
| # no arguments, print file |
| # How to use: | |
| # | |
| # Just place a lock.png in your home folder to overlay whatever you want | |
| #!/bin/bash | |
| scrot -e 'convert -blur 0x3 $f ~/lockbg.png' | |
| convert -gravity center -composite ~/lockbg.png ~/lock.png ~/lockfinal.png | |
| i3lock -u -i ~/lockfinal.png | |
| rm ~/lockfinal.png ~/lockbg.png |
| #!/bin/sh | |
| /usr/sbin/portsnap fetch update && \ | |
| /usr/local/sbin/portmaster -L --index-only | egrep '(ew|ort) version|total install' | |
| echo -n "Last update: " | |
| date -r `pkg query %t | sort | tail -n1` "+%Y%m%d" |