Monday, February 13, 2012

How To Date A Holiday

Christmas
Christmas calls ahead to let you know what gift to bring. It seems pushy, but it's ok because she asks you what present you want too.

The date comes around way too quickly and you end up shopping at the last minute. You don't get what she wants, but that's ok because she doesn't get what you wanted either.

You eat too much and drink too much and the bill for dinner is massive.

It looks like she is going to put out but in the end you are both too drunk and full so nothing happens. But that's ok.

Easter
She calls up when you are least expecting it and picks a very random day for a date.

The date starts well. She brings chocolate. Things end up carrying on all through the weekend and into Monday.

But all she wants to talk about is religion, and you part very awkwardly.

Valentines Day
She shows up looking ridiculously overdressed and smelling like the entrance to Myers. She orders the most expensive thing on the menu and expects you to foot the bill. You spend way too much on a present; she says all her friends got something better.

Then she offers to suck your dick for a dollar.

Monday, December 19, 2011

LCA2012 Countdown!

This free script provided by JavaScript Kit

Linux Conference Australia 2012 commences next month in Ballarat, and I certainly don't plan to miss it!

Thursday, December 1, 2011

CarrierIQ - you are being watched

The CarrierIQ scandal is certainly proving interesting:


http://www.osnews.com/story/25384/CarrierIQ_Rootkit_Found_on_Android

Most interesting? Apple appear to have been the only manufacturer to voluntarily include this rootkit.

It is bizarre to watch the battle for privacy being waged. Most of the keystrokes being logged are likely to be sms messages, emails or social network updates. Your emails are sent in plain text and your social network updates are broadcast to the world (or some subset). Google is already logging all your location and search habits.

Will this be seen as a line in the sand for privacy invasions, or will it just become accepted as another part of life?

Wednesday, November 30, 2011

Motion - adding a dongle

I forgot to turn Motion off the other day and found a lot of pictures to sort through the next day, mostly of me picking my nose on the couch. So I did this.

Below is an Ubuntu script that stops Motion whenever I insert a USB - and starts it whenever I remove it.


CHECKUSB=
ITSON=1
while :
do
        while [ $ITSON == 1 ]
        do
                sleep 5
                if [ -d /media/$CHECKUSB/ ]
                then
                        ITSON=0
                        /etc/init.d/motion stop
                fi
        done
        while [ $ITSON == 0 ]
        do
                sleep 5
                if [ ! -d /media/$CHECKUSB/ ]
                then
                        ITSON=1
                        motion
                fi
        done
done


The daemon 'stop' command appears to kill a regular process as well as the daemon.

This basically works like a simple security dongle - take the USB with you on your way out and plug it in on your way home to ensure that only relevant activity is being captured. Very basic but it works.

Monday, November 14, 2011

Nerf! Vigilon Review

I have been eyeing the new Vortex Nerf range with interest for some time now, and picked up the the Vigilon for AUD$20 at Target over the weekend.


Tuesday, October 18, 2011

Home security projects

Lately I have been playing around with some home security projects!

The script below takes a series of snapshots using a webcam and uploads these to a Picasa album called Footage. I use this script mainly to quickly check in on the house while I am away ;)

First, you will need to install and authorise google-cl: http://code.google.com/p/googlecl/downloads/list

Once installed, you should open a command prompt and type: google docs list (or a similar command).

You will need to enter an account name/password, and then authorise this via a browser - so it is probably easier to do this setup in an X environment. 

You will then need a *private* album called Footage in Picasa.

#!/bin/sh
COUNT=0
SAVELOC=this_is_where_you_save_your_security_footage
while [ $COUNT -lt 10 ]; do
 WHENREC=$(date +"%y-%m-%d-%H-%M-%S")
 FILEREC="${SAVELOC}${WHENREC}.jpeg"
 streamer -c /dev/video0 -o $FILEREC
 google picasa post --title "Footage" "$FILEREC"
 sleep 2
 COUNT=($COUNT + 1)
done
This script is designed to get a quick look at things remotely - it is triggered on demand via ssh.

The best Linux program I found for genuine surveillance is Motion.  http://www.debian-administration.org/article/An_Introduction_to_Video_Surveillance_with_%27Motion%27

By default, it saves recorded images/video to the directory it is started from. If you have Dropbox installed, cd to your Dropbox folder, type motion, and you will now be able to access the captured video/images from any computer.

One final script:
#!/bin/sh
COUNT=0
SAVELOC=this_is_where_you_save_your_security_footage
while [ $COUNT -lt 10 ]
 do
 WHENREC=$(date +"%y-%m-%d-%H-%M-%S")
 FILEREC="${SAVELOC}${WHENREC}.avi"
 streamer -q -c /dev/video0 -f rgb24 -r 3 -t 00:00:05 -o "$FILEREC"
 aaxine "$FILEREC"
 COUNT=($COUNT + 1)
done

You will need to have aaxine installed for this to work... but it will play back an ascii video from your webcam in the terminal. Replace aaxine with cacaxine for a colour version ;)


Monday, October 17, 2011

Linux - automate conversion of Youtube music to mp3

The following is a basic Linux bash script I use to convert music videos downloaded from Youtube into MP3 format. I have saved all my videos into category subfolders, so my line 7 actually reads for i in ./*/*.*; do

#!/bin/sh
FROMFOL=folder_full_of_flv_or_mp4_files
DESTFOL=folder_to_fill_with_mp3_files

cd $FROMFOL

for i in ./*.*; do
        TRIMMED=$(basename "${i}")
        if [ ! -f "${DESTFOL}${TRIMMED}".mp3 ];
        then
                ffmpeg -i "${i}" "${DESTFOL}${TRIMMED}".mp3
        fi
done

This script can then be added as a cron job to automate the conversion of new videos into MP3 files.

I use the firefox plug-in DownloadHelper to obtain youtube clips in the first place, which work well on the big screen at parties :)