So I swear a lot here

posted in the website with 0 comments
#!/bin/bash
# List compiled from:
# Slate: http://goo.gl/vPC4X4
# Wikipedia: http://goo.gl/mdcyT8

swear_words=(
    'shit' 'fuck' 'damn' 'bitch' 'crap' 'dick' 'bitch' 'crap'
    'dick' 'piss' 'pussy' 'fag' 'asshole' 'cock' 'bastard' 'darn'
    'douche' 'slut' 'whore' 'christ' 'jesus' 'arse' 'bloody' 'bollocks'
)

if [[ -f "$1" ]]; then
    echo -e "\t\nCount for swear words in $1:\n\t"
    printf "%-12s %s\n" "Word:" "Count:"
    echo "----------------------"
    for w in "${swear_words[@]}"; do
        n=$(egrep -o -i $w "$1" | wc -w)
        printf "%-12s %s\n" $w $n
    done
else 
    echo "Error: $1 is not a valid file"
    exit 1
fi

exit 0
Word:        Count:
----------------------
shit         1323
fuck         2933
damn         146
bitch        318
crap         475
dick         62
bitch        318
crap         475
dick         62
piss         384
pussy        4
fag          4
asshole      201
cock         362
bastard      160
darn         16
douche       2
slut         0
whore        116
christ       1224
jesus        73
arse         632
bloody       176
bollocks     0

by Mark -

Yeah, to hell with the Irish lottery

posted in random with 0 comments
6 / 45 = 0.133333333
6 / 44 = 0.1363636363636364
6 / 43 = 0.1395348837209302
6 / 42 = 0.1428571428571429
6 / 41 = 0.1463414634146341
6 / 40 = 0.15

0.133333333 * 0.1363636363636364 * 0.1395348837209302 * 0.1428571428571429 * 0.1463414634146341 * 0.15 = 0.00000795574
= 0.00000795574 * 100000
= 0.795574

0.795574 probability of a winning combination after one hundred thousand lottery draws.

by Mark -

Happy birthday Gar

posted in family with 0 comments

Garrett on a scooter in Cliffoney

Garrett, you only remember me as a face on a screen, and I don’t know you except as a wild, wiley and bitey toddler. Every moment that I’ve had with you has been precious, given how few of those there have been. Before you were born I didn’t want anything to do with you. I couldn’t stand to look at you on the ultrasound or feel you kicking.

When you handed to me for the first time I had a road-to-Damascus conversion. Here was a Mini Mark, whole and complete! I left soon after that, and didn’t see you again until you were almost two.

We had a summer and a half together, which was enough to see you’re full of a fire that matches your white hair. I love you and I hope that you have a great fifth birthday with your sister and cousins.

by Mark -