| AddressBooker & exporting my Facebook Phonebook |
[Nov. 30th, 2008|09:25 pm] |
This 4-day weekend was awesome for catching up on personal hacking projects. In addition to adding IPv6 support to Perlbal and hacking on my interactive shadow/art wall more, I also worked on a little address book management tool, AddressBooker [source here].
Basically AddressBooker takes a POST of contacts data in JSON form, and does stuff with it, where "stuff" is currently limited to merging it into your Google Contacts. (GMail, Android, etc) This was my experiment in learning GData, AuthSub, and App Engine a bit more.
Anyway, I then wanted to get my Facebook Phonebook exported to my Google Contacts, so it'd sync to my Android phone. I didn't see an export option in Facebook (maybe I missed it?), so I wrote a little GreaseMonkey script instead to automate the whole process:
http://bradfitz.com/greasemonkey/facebook_phonebook_export.user.js
If you have Firefox and GreaseMonkey, then click the above link and it'll ask if you want to install it. Install it, then go to your Facebook Phonebook (sorry, no permalink to it), then go into Tools > GreaseMonkey > User Script Commands... > and you'll see Export Facebook Phonebook. That'll then page through your phone book (you should probably start on page 1: it's kinda flaky) and extract the data, and then POST it to AddressBooker for you, which will then guide you through merging it into your Google Contacts.
Enjoy!
(And keep in mind I barely know browser stuff or Greasemonkey or Python or App Engine or GData, so patches welcome!... brad@danga.com, or Github) |
|
|
| A shout-out to good products |
[Nov. 27th, 2008|02:14 pm] |
I bitch about stuff a lot (in a loving way?), so I think it's important for balance's sake to take a second occasionally to recognize companies and products that kick ass.
Today I'm giving a shout-out to my A/V Receiver, the Denon AVR-4806. Yes, it's a little old by now, but not really, and the one feature it's missing (1080p HDMI upscaling and routing) is available as a firmware upgrade.
What else do I love about it? Its documentation! Holy shit, would you look at that? IR codes, its serial/ethernet wire protocol for controlling it, and its HDMI specs.
Wait, Ethernet? How have I not taken advantage of this before today? Must remedy.
After doing the three button incantation on the receiver to enable "Network Settings" in the menu (must hide it by default to not confuse people!?), I selected DHCP and it got on the network. I then read the aforelinked protocol docs and whipped up a stupid little interactive AVR-4806 controller in Perl. I love how the protocol is two way: you can tell it to do stuff, but it also notifies you of all changes to its state. I go twist the physical volume knob and I get immediate status packets back from it.
I'm thinking of giving my neighbors a webserver interface to the volume knob, so they can turn down the music if (when) my Wednesday night parties get too loud. |
|
|
| I get the dumbest emails. |
[Nov. 24th, 2008|09:28 pm] |
Oh man.Hi there Brad
I've been looking around the internet for a solution to our population explosion of auto garage doors. I'll give you my situation & my vision.
Here goes, We live in a small village, St.germans Cornwall UK. Both my missus & I have moved to a retirement area,nice!! not.. To late now, we live here.All the oldies are not into us at all (as we are young).You know how it is.
Well these people need to be taught a lesson, i think.hahaha.. Well most of them have single auto garage doors. This is where you come in hopefully. (I noticed your website & what your into).
Is there anywhere i can buy or make a door opener. My vision is to sit out in the garden with the guys & a few beers, watching the mass confusion as the neighbours lose control of their beloved doors opening/closing or not even working.
Can you help? You guys helped us in wars in the pasted, can you in this one. Britain needs you, haha lol...
Cheers [name redacted because I'm not a total asshole] |
|
|
| IPv6 (or, hello from 2001:470:1f04:900::2 !) |
[Nov. 17th, 2008|11:44 pm] |
I figured it was time to learn IPv6 so I setup IPv6 at home using Hurricane Electric's free tunnel broker, one termination point of which is across the Bay in Fremont, so latency overhead is negligible, and he.net's IPv6 deployment is good (or so Lorenzo tells me).
sammy:~# ping6 ipv6.google.com
PING ipv6.google.com(2001:4860:0:2001::68) 56 data bytes
64 bytes from 2001:4860:0:2001::68: icmp_seq=1 ttl=58 time=97.7 ms
64 bytes from 2001:4860:0:2001::68: icmp_seq=2 ttl=58 time=96.9 ms
64 bytes from 2001:4860:0:2001::68: icmp_seq=3 ttl=58 time=97.2 ms
64 bytes from 2001:4860:0:2001::68: icmp_seq=4 ttl=58 time=98.0 ms
sammy:~# ping google.com
PING google.com (64.233.187.99) 56(84) bytes of data.
64 bytes from jc-in-f99.google.com (64.233.187.99): icmp_seq=1 ttl=246 time=94.5 ms
64 bytes from jc-in-f99.google.com (64.233.187.99): icmp_seq=2 ttl=246 time=97.7 ms
64 bytes from jc-in-f99.google.com (64.233.187.99): icmp_seq=3 ttl=246 time=93.7 ms
64 bytes from jc-in-f99.google.com (64.233.187.99): icmp_seq=4 ttl=246 time=92.5 ms (Not that much worse.)
And I can now see all the dancing logos on various websites. (it's IPv6 tradition to serve animated GIFs of your company/site logo for people accessing it over IPv6.... silly, but cute.)
Still have some work to do... I need to get the rest of my machines routing through my Linux server (the one with the tunnel), including wifi. What's the typical configuration here? DHCPv6 and broadcast the route? Or does the IPv6 stateless auto-configuration for assigning the locally-scoped/link-local/etc addresses also include smarts of hosts w/ gateways advertising that?
In any case, still clueless, but at least with the tools to get slightly less clueless now.
It's weird having my own /64. (that's 2^64 addresses for my house) |
|
|
| Android Garage Door Opener |
[Nov. 16th, 2008|11:36 am] |
I've finally put the source code to my Android garage door opener online:
To get it, just run:
$ git clone git://github.com/bradfitz/android-garage-opener.git
Or browse the code online. Just keep in mind the code might suck because I barely know Java or Android, so educate me if you see bugs. But it works. *shrug*
Enjoy. |
|
|
| Losing Stuff |
[Nov. 9th, 2008|04:02 pm] |
I'm useless lately...
Left my iPhone in Moscow in late September. Lost my laptop (left it in a restaurant) the other night. Lost/dropped my sunglasses (somewhere in Cycle Gear?) just earlier today.
The iPhone came back the other day but I have little hope for the laptop and sunglasses. *sigh* |
|
|
| Ass Robots |
[Nov. 7th, 2008|08:36 am] |
I think the world needs more robots that climb up your ass:
 |
|
|
| Election stuff |
[Nov. 6th, 2008|10:35 am] |
Obama: yes! (kinda like this)
Prop 8: boo. (aww/heh)
Lost my laptop: boo.
And Palin didn't know Africa was a continent and not a country? Love it. |
|
|
| non-US citizens for Obama |
[Nov. 3rd, 2008|11:23 pm] |
I work with a number of non-US citizens and I keep accidentally asking them if they've voted yet, then catching myself.
At dinner tonight I accidentally asked a German coworker if he'd voted yet and his answer surprised me: because he's not able to vote, he instead volunteered for the Obama campaign this weekend, calling voters in swing states and encouraging them to go vote. He figures he did his part that way, probably doing more good than 1 California vote anyway.
Awesome. |
|
|
| yay! android lj app. |
[Nov. 3rd, 2008|12:40 pm] |
|
Just noticed new android app in the market, ElJay. Yay! Now I can post quicker from my phone. |
|
|
| Amazon default shipping option |
[Nov. 1st, 2008|11:35 am] |
Any Amazon employees read this blog?
Please to be filing internal bug report, k thx:
* users should be able to set their default shipping destination
At least if it exists I can't find it. Make it part of the normal change-destination-during-checkout flow. Perhaps a [X] Make this the default checkbox. I do not want to ship everything to my parent's house. It's been awhile since I lived there. |
|
|
| Heh... |
[Oct. 31st, 2008|05:59 pm] |
Brains... http://google.com/robots.txtUser-agent: zombies
Disallow: /brains
User-agent: *
Allow: /searchhistory/
Disallow: /news?output=xhtml&
Allow: /news?output=xhtml
Disallow: /search
Disallow: /groups
Disallow: /images
Disallow: /catalogs
....
|
|
|
| Android Garage Door Opener, part 2 |
[Oct. 26th, 2008|12:06 pm] |
This is a follow-up to my previous post to say:
SO. FUCKING. AWESOME.
I got it all working. I now have an Android Activity (GarageDoorActivity) which interacts with an Android Service I wrote (InRangeService), letting me start and stop the service's wifi scanning task. The service gets the system WifiManager, holds a WifiLock to keep the radio active, and then does a Wifi scan every couple seconds, looking for my house.
When my house is in range, it does the magic HTTP request to my garage door opener's webserver (HMAC-signed timestamped URL, for non-replayability/forgeability if sniffed) and my garage door opens. Complete with a bunch of fun Toast notifications (like Growl) and Android Notifications (both persistent ongoing notifications for background scanning, and one-time notifications for things like the garage door actually opening).
I just threw on some shoes and hopped on my motorcycle to do a test lap around the neighborhood. When I got to the corner, I pulled up the activity and press "Start" (aka "Going home now"). A lady on the corner saw me playing with my phone on my motorcycle and said, "The reception's not so good up here." I thanked her, not wanting to explain what I was actually doing.
I then finished the lap around the block and the garage door started opening a few houses away. By the time I pulled up, I could already back the bike into the garage. HELL YES.
Update 2008-11-16: The source code is now available. |
|
|
| Lala |
[Oct. 21st, 2008|12:38 pm] |
I'm in love with Lala.com:
http://lala.com/
I'm having a hard time finding something to not like about it.
It's a music site combining purchasing, listening, uploading (your online music locker), social stuff, etc.
News about its relaunch today: http://news.google.com/news?q=lala |
|
|
| Fun with Android |
[Oct. 20th, 2008|10:31 am] |
I've been having fun writing Android apps.
My main Android app I care about is my garage door opener. I have a webserver hooked up my garage door opener, so I can open my garage over the network. Combined with a background process doing wifi scanning, the idea's that when I'm on my way home, I pull up to my house on my motorcycle and the garage door magically opens and I back into my garage without taking off my helmet/gloves/etc.
Last night I wrote the background wifi scanning service part and walked around my house and neighborhood to get the signal strengths to the three different APs in my house (and the other ones of my neighbors). Looks like it'll work perfectly. Now I just need to wire up my wifi scanning service with my garage door opening code (simple http client that HMAC signs one-time timestamped URLs).
I just mentioned to evan that it looks like I have enough data to real-time triangulate within my house which room I'm in, since I have enough access points and their signal strengths vary enough. I was going to just make some stupid widget on http://bradfitz.com/ show where I'm at (which room at home, at work, in car via Bluetooth detection, on google shuttle via wifi detection, etc...) even without GPS (or with, if available).
But evan went one further:make it turn on the lights for whatever room you're in. that'd be cute. you could call it "magic wand of light" Hell yes.
Update: See the conclusion in Part 2. |
|
|
| Long day |
[Oct. 15th, 2008|12:42 am] |
Woke up at 6:30 am, got ready, picked up erinearl and drove to work. I almost never drive to work, but...
After work there was a memcached hackathon ~5 miles from Google at Sun's campus. So I went to that and met a bunch of people, both people I've met before and people I've only talked to online. And got some hacking done. It was weird working in C again after a year+ of C++.
So back now at ~12:30 am. Long day. I'm debating going to Seattle again this weekend (or this Friday, actually) for another UW event, this time not for a building's birthday, but they think I'm wonderful. And who could say no to that flattery? Debates & cooking & voting discussion party tomorrow (er, Wednesday) night at my house, if you didn't get the invite. |
|
|
| Я в Москве... |
[Sep. 26th, 2008|11:41 pm] |
After a little weekend trip to Istanbul, I've been working in Moscow this week. (hey, it's close)
Anyway, time to enjoy the city this weekend before returning home. My mobile number is +7 (915) 353-36-83 if there's anything fun going on that I should know. :-) |
|
|