Uncategorized

An update to the bash script that takes a parameter:

#!/bin/bash book=$1 [[ -z $book ]] && { echo “No argument supplied, exiting!”; exit 1; } [[ ! -e $book ]] && { echo “Can’t find a file with the name $book, exiting”; exit 1; } title=${book%.*} bookcounter=0 linecounter=0 sed -i ‘s/\r$//’ “$book” while read line do ((linecounter+=1)) if [[ $linecounter -gt 300 && -z “$line” || -z “$output_file” ]];…

Continue Reading

Scripting

Get emailed a portion of classic literature each day.

Ok, so I am feeling guilty over not reading enough GOOD books. So, I devised a cunning plan whereby I am emailed a portion of a classic book each day. I started with the Iliad. I know that I’ll clear my emails every single day because a cluttered inbox irritates me…so this is the perfect motivational tool. I wrote each…

Continue Reading

Android

Simple tip to make Android easy to access…

…via your home wifi server. (1) Install On Air from the Android Market. (2) Ensure that your home wifi is accessible through your phone’s Settings menu. (3) In On Air, set your preferences to “use the same 4-digit code”. (4) Hit the big button to turn on the FTP server on your phone. (5) In your chosen file manager (mine…

Continue Reading