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 |
#!/bin/bash | |
# | |
# Change this to specify a different handbrake preset. You can list them by running: "HandBrakeCLI --preset-list" | |
# | |
PRESET="AppleTV 3" | |
if [ -z "$1" ] ; then | |
TRANSCODEDIR="." | |
else | |
TRANSCODEDIR="$1" | |
fi |
# A simple script to convert csv from us.hsbc.com Money Management Tools website to be readable by YNAB. | |
# YNAB wants: Date,Payee,Category,Memo,Outflow,Inflow | |
__author__ = "Alex Johnstone <alexjj@gmail.com>" | |
#Input file from HSBC US | |
import_csv = 'ExportData.csv' | |
#Drop any transaction prior to this date | |
cutoffdate = '2015-09-01' |
#List unique values in a DataFrame column | |
pd.unique(df.column_name.ravel()) | |
#Convert Series datatype to numeric, getting rid of any non-numeric values | |
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True) | |
#Grab DataFrame rows where column has certain values | |
valuelist = ['value1', 'value2', 'value3'] | |
df = df[df.column.isin(value_list)] |
#!/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" |
# 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 |
# Note | |
note () { | |
# if file doesn't exist, create it | |
if [[ ! -f $HOME/.notes ]]; then | |
touch "$HOME/.notes" | |
fi | |
if ! (($#)); then | |
# no arguments, print file |
autoconf | |
automake | |
bash | |
binutils | |
bison | |
bzip2 | |
coreutils | |
cryptsetup | |
device-mapper | |
dhcpcd |
I hereby claim:
To claim this, I am signing this object:
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 |