Counting Pull-ups

posted on apr 25th, 2012 with tags fitbit, openbsd, and ruby

I’m a big fan of my Fitbit pedometer because it does most of its work without any interaction. I clip it onto my pocket and it counts my steps and flights of stairs as I walk throughout the day, then automatically, wirelessly uploads the data to Fitbit’s website whenever I’m within range of its USB dongle plugged into one of my computers. The whole thing works without having to think about it or plug anything in. The battery lasts for about a week, and when it finally runs low, my low battery notifier sends a message to my phone through Pushover telling me to put it on its charger for a few hours.

To add to my step data, I got a Withings scale last year which logs my weight and BMI on Withings’ website automatically every time I step on the scale. Fitbit’s website syncs this data from Withings, so now I’m able to track my steps, flights of stairs, weight, and BMI, all automatically, all on Fitbit’s website. I use this data mainly as a motivation to walk more and not get fat, just as my Wii Fit motivated me to exercise every day by tracking all of the data. When I know my Fitbit is counting my steps, I’ll avoid hopping on the bus or train to get home and just walk. A few times I’ve left the house and upon noticing my Fitbit wasn’t there, walked all the way back and got it just so the steps I was going to take that day would “count”.

Continue reading 876 words...

Building Pushover

posted on mar 16th, 2012 with tags android, ios, iphone, pushover, and ruby

On March 7th, 2012, I announced the launch of Pushover, a simple mobile notification service with device clients available for Android and iOS. I kept some notes during the development process, which mostly occurred in the evenings and weekends around my other work.

I had been using Notifo for a year or so to receive push notifications on my phone from my custom network monitor, but last year the free service announced it was shutting down. When I switched back to my Android phone a few months ago, I was unable to download Notifo’s Android app which never made it out of beta.

Continue reading 4,067 words...

On Android

posted on nov 20th, 2011 with tags android and blandroid

The source code to Android 4.0, nicknamed Ice Cream Sandwich, was made available last Monday. For developers of Android ROMs like my Blandroid project, these source code releases enable us to release our own modified versions of Android to users that prefer to use our software on their phones. The source code to the previous major version, Android 3.0, was not made available1 and was only given to certain tablet manufacturers like Motorola.

Continue reading 2,750 words...

An Ecobee Automation Hack

posted on aug 29th, 2011 with tags apple, ecobee, and ruby

I’ve had an Ecobee thermostat in my house and now in my apartment for a number of years. It’s a touchscreen thermostat equipped with 802.11 wireless that can be remotely adjusted and monitored from Ecobee’s website as well as iPhone and Android applications. While the expected use case might be monitoring the temperature of one’s home while at work, I often lazily use the phone applications while at home when I’m too cold to get out of bed to turn the heat up. With some Ruby code and SNMP, I am now able to automatically detect when I am home and when I leave the apartment, and adjust the temperature automatically.

ecobee thermostat mounted on wall

Continue reading 1,063 words...

On Tinfoil Hats

posted on mar 23rd, 2011 with tags security

Some time in 2010, Google, Adobe, and “dozens of other high-profile companies” were hacked by the Chinese government. The attack was done through a previously unknown vulnerability in Internet Explorer and considered to be highly sophisticated. The attackers copied intellectual property of these companies and accessed Gmail accounts of human rights activists.

Rather than directly hack into the accounts of those activists, the entire e-mail provider was compromised.

Continue reading 1,427 words...

Pipe Event Plugin for Adium

posted on dec 27th, 2010 with tags adium, macos, and pidgin

Back when I used OpenBSD on my laptop and Pidgin for instant messaging, I wrote a D-Bus script to watch incoming messages and forward any to my cell phone that were received while my screen was locked. The script forwarded messages to Prowl’s web API, which would forward them to my iPhone using push notifications.

The last time I switched back to a Mac desktop, I had to switch back to Adium and lost the ability to selectively forward messages. While Adium does have an event action to run an AppleScript, there’s no way of passing the actual event text to the script, so it has to talk back to Adium and try to find the newest message. The only option was to generate Growl notifications for all messages and then configure Growl to forward them to Prowl. I got fed up with that pretty quickly, so I modified Adium to create a new event type for “messages received while away”. That way I could have the Growl notification only on that event, so I would only get messages forwarded while away. That worked better, but it prevented me from being able to go away while still at my computer without getting a bunch of messages queued up on my phone.

Continue reading 552 words...

Properly stopping a SIP flood

posted on apr 11th, 2010 with tags asterisk, networking, openbsd, ruby, security, and voip

At about 9am yesterday morning, I noticed on my server monitor that the CPU utilization of one of my servers was abnormally high, in addition to a sustained 1mbit/sec of inbound traffic and 2mbits/sec of outbound traffic. syslog messages from Asterisk showed it to be a SIP brute force attack, so I dropped the offending IP (an Amazon EC2 instance IP) into /etc/idiots to block it and went back to my work.

A while later, I noticed the traffic still hadn’t died down, so I reported the incident to Amazon and my server’s network provider. No luck on either front; Amazon just sent back a form reply stating the incident was forwarded to the EC2 instance’s owner (yeah, seriously) and the network provider said they wouldn’t bother adding an ACL to their border equipment unless it was needed to protect their entire network. With the IP blocked on my server, the CPU utilization had died down and it was no longer sending out reply traffic, but I was worried about the inbound garbage traffic counting towards the server’s monthly bandwidth cap.

Continue reading 832 words...

restoring case-sensitive hfs+ volumes with time machine

posted on nov 11th, 2009 with tags macos

i’ve always formatted my mac os partitions with case sensitivity enabled, which usually means formatting a new system and re-installing mac os x as soon as i get it. after installing the 10.6.2 update, i lost my system menu bar icons and was forced to restore from a 10.6.1 backup made the day before.

following apple’s instructions, i booted to the snow leopard installation dvd, chose the “restore system from backup” option and thought i was on my way. about 50% into the recovery, the recovery application crashed:

Continue reading 820 words...

watching the web discover goingtorain.com

posted on nov 29th, 2008 with tags web

the buzz around and traffic to goingtorain.com is slowing down now and i’m amazed how many people responded positively and thought it was actually useful.

while talking to dave about it yesterday, he remarked something along the lines of, “of all the awesome, useful shit you’ve ever made, the thing that finally became famous was this stupid little site.”

Continue reading 911 words...

making mutt useful offline

posted on sep 29th, 2008 with tags mutt

i’ve been using mutt as my mua for over 8 years now. long ago i would ssh to my server and run it on local maildirs, but as soon as i started using smartphones and multiple computers i had to switch to an imap+ssl setup. mutt’s header_cache option has long made accessing large mailboxes snappy, and the recent message_cachedir option available in 1.5 makes browsing through messages with attachments equally snappy over imap.

a useful side effect of message body caching is that it provides an offline copy of entire mailboxes which get synchronized automatically and can easily be read in mutt as a local mailbox… well, almost.

Continue reading 378 words...

My history with OpenBSD

posted on jul 30th, 2008 with tags openbsd

I received an e-mail asking me how I got started with OpenBSD, so I thought I’d write the answer here in case anyone else wanted to read it.

I started using OpenBSD in 1998 (version 2.3 or 2.4) to host a BBS that I was running. I chose OpenBSD because of its security record and because I was getting fed up with Linux (Slackware) at the time. I think the machine was a Pentium 75 or something, and OpenBSD worked quite well on it. During the course of building the BBS, I had to install some 3rd party software, so I got interested in OpenBSD’s ports system to make installation of that software cleaner. I submitted some ports to the ports@ mailing list and got them committed by other developers. I tested others’ ports and supplied feedback where I could. I hadn’t done much unix development back then, so writing simple makefiles for ports was an easy way to get involved.

Continue reading 1,175 words...