Video Demo of the Staff

Several people have asked how the project’s coming along, and I realized that the most recent video only showed a little bit of the functionality.  So I dusted off my iMovie skills and whipped up a little demo (complete with background music!  Aren’t you impressed?).  All the current modes are displayed, though the most recent one isn’t quite done yet.

Enjoy!

23andMe – A Scientific Look into Myself

European.  Whoddathunkit?
My genetic backround

A couple months ago, a friend pointed me to the website 23andMe.com.   Their mission statement is pretty straightforward.  “23andMe’s mission is to be the world’s trusted source of personal genetic information.”

Here’s how it works.

After signing up online and coughing over my $100, 23andme sent me a small kit.  Inside the kit is a little plastic tube.  All you need to do is fill part of the tube with saliva, seal it up, and mail it back to them.  It’s all postage paid, so it’s just a matter of dropping the box in the mail.

About 4 weeks later, you’ll get a piece of email saying your results are ready to be viewed.  And then things get interesting.

Continue reading “23andMe – A Scientific Look into Myself”

Notifications on all Logins on a Linux Host

Putting this one out there because I spent some time surfing various Well Known Sites and couldn’t find a complete answer.

We had a need to log whenever users logged into a production host – just a notification send to the admins saying someone was on one of the production boxes.  The other requirement was to have it be low impact – didn’t need a ton of monitoring packages installed, etc.

The result is a pair of scripts.

The first is ‘checklogin.sh’:

 #!/bin/bash
 # Nov  6 13:35:25 inf-1 sudo: dshevett : TTY=pts/0 ; PWD=/etc/munin ; USER=root ; COMMAND=/etc/init.d/munin-node restart
 TMPFILE=checklogin-$$
 AGO=`date "+%b %e %R" -d "1 min ago"`
 grep "$AGO" /var/log/auth.log | grep 'session opened for user' | grep -v CRON > /tmp/$TMPFILE
 grep "$AGO" /var/log/auth.log | grep 'sudo:'| grep -v pam >> /tmp/$TMPFILE
 cat /tmp/$TMPFILE | /tools/sysconf/scripts/mail_if_not_empty ops-notice-internal@REDACTED.com "[inf-1:checklogin.sh]"
 rm /tmp/$TMPFILE

This simply looks for some patterns within the auth.log file. The only real trick here is making a date formatted string that is ‘one minute ago’. If this script is run once a minute via a cron job, it’ll send mail within a minute of someone logging into the host.

The other script is a simple utility tool I use for most of my cron jobs called ‘mail_if_not_empty’:

 #!/bin/bash
 TMPFILE=/tmp/joboutput.$$
 TARGET=$1
 SUBJECT=$2
 cat >  $TMPFILE
 if [ -s $TMPFILE ]
 then
   mail -s $SUBJECT $TARGET < $TMPFILE
 fi
 rm $TMPFILE

Super-duper simple, it just sends mail if there's any output.  This makes sure that mail will only be generated if anything interesting happens.

The Arduino Mini 05 is… well, mini!

Arduino Mini 05
Arduino Mini 05

I’m looking to replace the Arduino Uno in the staff with a smaller controller that will fit in the body of the internal tube. The Mini 05 seemed like the best option… well, received it this weekend, and I have to admit, I’m a little daunted.

On the one hand, it sure will fit in the staff, on the other hand, there’s a lot of very small contact points here. My soldering is pretty crude. I’ll have to put in a header for the USB port first, after that I can probably use a socket, which’ll make connections a lot easier.