In uncategorized on
27 February 2010 with no comments
Finally. After what seems like a ridiculous amount of futzing around, MMS & tethering working on an iPhone 2G.
- If you’ve already attempted to get this working by screwing around with your phone, your best bet is to do a clean restore to 3.1.2. You should already know how to do this using pwnage tool. It’s really really easy, especially if your phone is already unlocked/jailbroken.
- Add cydia.iphonemod.com.br and cydia.pushfix.info to your Cydia sources
- Install “iPhone 2G: tethering, MMS and full Bluetooth” from Cydia
- Download the appropriate carrier settings zip files from modmyi.
- In terminal run [~] defaults write com.apple.iTunes carrier-testing -bool TRUE
- Unzip the file you downloaded earlier.
- Start iTunes and select your iPhone.
- Hold Option down while clicking the ‘Update’ button
- Select the appropriate ipcc file
- Reset your Network settings.
Voila! Why did I desperately need this? Nagios is sending us alert notifications through an email gateway and I’d much rather mess with my phone than figure out how to get nagios to only send me plain SMS. Goodbye G1, it’s been, um, slow.
In uncategorized on
26 February 2010 tagged simpsons with no comments
Wherein Afshin and I attempt to watch and review every episode of The Simpsons. Wish us luck. And buy something damnit!
http://dohsimpsons.com/
In goodstuff, music, osx, ruby, technology on
20 April 2009 with no comments
So I was hacking on some Android stuff this weekend and I was immediately distracted by constantly having to flip the song on iTunes party mix DJ bullshit marketing name for shuffle mode. What I wanted was the equivalent of seek mode on car stereos. Where you basically press a button and every 10 seconds, it auto-flips to the next song until you tell it to stop.
OK, this can’t be that difficult right? Right. http://github.com/zackola/itunes-scan/tree/master
A few things. This is basically just a inline script written in Ruby. It uses RubyOSA as an event bridge to interact with iTunes. Although RubyOSA is pretty early, it worked great. You will also need Growl as this makes use of growlnotify to tell you what the track is on change. Also, this is best launched from Quicksilver, but before you do that, you need to turn on the “Run tasks in background option” under “Extras”.
To control the starting/stopping of scanning I’m just saving a text file in ~/.trackscanner with the PID of the process that started the scanning. Sorry for littering your home directory and if anyone has a better idea of where to store this info I’d love to know. Sorry only tested on OS X at the moment.
In uncategorized on
24 February 2009 with 1 comment
Quick Ruby tip. Shame on me for not knowing this but in irb
>>>_
That’s the underscore character, is always equal to the last expression that was evaluated. Thanks @sd.
In astronomy, goodstuff, linux, osx, programming, technology, what i learned today on
15 January 2009 with no comments
Been so busy there’s barely been any time to think about blogging. Today’s edition of What I Learned Today covers two totally separate topics. The first is:
Ack
Ack you say?! Yes. ack. Ack is a command line utility that searches through files for patterns of text. It’s like grep except…it’s more friendly, has some options turned on by default, as far as I can tell its faster too. Oh, and as the ack page points out, its one character shorter than grep. Plenty instructions over there on how to get it installed. I had macports running already to i just:
?>sudo port install p5-app-ack
and I was done in a minute.
Ephemerides
Right. So as some of you might know I’ve been working on this android app for my G1 that displays stars and constellations given the current date, time of day and your geographic location on Earth. I’ve gotten to the point where the stars are showing up, the constellation lines are being drawn, and shit generally looks correct. And then one of my co-workers of course says, “Hey, where’s the moon?”. At which point I throw miniature beach ball at him and say, fuck, I don’t know.
The star data had been pretty straight forward, given out (after some searching) with a RA and Declination that just worked (once you did some gnarly calculations). Data for planets and other objects in our solar sytem (ahem, Luna you ass) however was much harder to come by. I’d been looking on and off for the last week, and just couldn’t find the right information on how to calculate a RA and Declination I could use for the moon. Until today. I needed an Ephemeris. Which is just a fancy way of saying data table. Now if only someone could tell me how to calculate an Ephemeris, eh, maybe I don’t want to get into it. That’s OK, go fucking NASA! They’ll do it for you. Awesome, exactly what I needed. Mad props to ‘jim m’ on the astronomyforum.net moon forum for the tip.
In uncategorized on
26 October 2008 with 6 comments
Apparently you need the:
<uses-permission android:name=”android.permission.ACCESS_COARSE_LOCATION”></uses-permission>
<uses-permission android:name=”android.permission.ACCESS_FINE_LOCATION”></uses-permission>
<uses-permission android:name=”android.permission.INTERNET”></uses-permission>
in your manifest file. Wasted a day on that INTERNET one! I swear it was working yesterday without it, but today I was just getting a blank map grid.
Other gotchas about MapViews:
- In the manifest file, those <uses-permissions> elements should come before your <application> element
- In order to define a MapView in an XML layout file, you can’t use a <MapView> element. Instead, you must have a <com.google.android.maps.MapView/> element, and you need to have a android:apiKey attribute in there as well, with a valid android maps api key. Not intuitive.
- Activity.findViewById is a very useful function
- The only type of Activity that can show maps is a MapActivity
In uncategorized on
22 October 2008 with 1 comment
- I worked at Microsoft
- I worked at Juno
- I learned stuff about software
- Buy my software
In goodstuff, programming, technology on
5 October 2008 with no comments
I’ve been a longtime subversion user and before that Visual SourceSafe (ew gross), but at the new jobby job, it’s all git all the time. Being very used to the pretty awesome TortoiseSVN and ZigVersion gui clients for svn, I’ve been a bit hesitant to really dive into git, not really knowing what to expect out of the experience of using shell only tools, and in general understanding why git was designed, and what the big deal was vs. svn, cvs, and other traditional source control management tools. Now that I’ve spent some time making Terminal.app my bitch (fodder for another post I’m afraid), I realize (not fully yet of course) how awesome getting into git can be.
So here’s a quick list of why git rocks, or why I think it does anyhow, and why it’ll be my tool of choice, at work and at home for quite some time.
- When you initially start working on a project someone else has started, already in a repo somewhere, you need to clone it. This is approximate equivalent of svn checkout, pulling the project down to your machine. The really big deal though, is that you now have, on your machine, a complete copy of the repository, not just a checked out working directory, but a full repo! Yes! The entire history of the entire project, and every file in it on your little old machine. Because most work is done locally, git is fast.
- It’s pretty space efficient and smart about diffs. Check this quote ripped from the Peepcode PDF on git: “The Ruby on Rails Git repository download, which includes the full history of the project – every version of every file, weighs in at around 13M, which is not even twice the size of a single checkout of the project (~9M). The Subversion server repository for the same project is about 115M.”
- No muss no fuss. With svn, you end up littering your working directory with tons of .svn directories. With git, there’s just one .git directory in the root of your project.
- Rebasing interactively. Re-order, split, edit commits and then send them on their way. Sounds pretty odd right? Check out the interactive mode section over at the git doc page.
- Branching, for the win. If you’re used to svn, sourcesafe, cvs, or most other traditional systems, when you hear “branch”, you probably want to curl up into a little ball and die. Nightmares of manually resolving hundreds of conflicts, cats and dogs living together, fire and brimstone! Blah! First of all, git was designed to reduce these headaches so almost every bit of development you do ends up being done in your own little branch. You can freely commit to your own branches and switch back and forth between branches at your leisure (git checkout), pull everyone elses recent commits into master, while not at all disrupting your own branches. Files that have been modified but not committed to any particular branch will follow you around as you checkout different branches. This threw me off at first, but makes life so much easier.
I highly recommend that Peepcode PDF, and if you are looking for something a bit shorter, Git Magic by Ben Lynn is wonderful.
In goodstuff, osx, technology on
4 October 2008 with no comments
Well, it’s been a few weeks of working fulltime with Ruby, Rails, on OS X and I must say, I know so much less than I thought I did about OS X, Ruby, and Unix-like systems than I could have imagined. I have taken for granted that in the last seven years of experience I had come to intimately know the Windows stack, and could bend it to my will and bring it back from the brink of death at a moment’s notice with the flip of a switch. I believe educators would say I had fully internalized this knowledge, and not having that foundation to rely upon is really quite scary.
Happily though, I’ve commited myself to doing the same for Linux, OS X, Ruby, Rails, MySQL and host of other great tools. The follow couple of posts will be dedicated to some of the things I’ve found most difficult about switching over from a Windows environment, and how to effectively use some powerful tools that I’ve come across on the way. I think others in the same position will find this info quite helpful. Either way, nothing quite reinforces what you learn like writing it down, so even if it doesn’t help anyone else, it’ll still be useful to me. I’m lucky enough to have the support of some extremely smart, talented, patient, and helpful people, and to everyone I work with, Afshin, and Katie, thanks for putting up with me as I get aclimated.
In horseshit, idiocy, linux, microsoft, technology on
6 September 2008 with no comments
When you are working in XP, and you need to view a calendar to see what day of the week a particular date falls on, how do you do it? Well, if you are like 95% of non-corporate windows users (not getting your time from a domain controller or time server), you probably double click on the little date/time thingamajig on the taskbar. This takes you to the computer’s date/time settings, which allows you to you know, change the system date/time. This is idiotic. Really, what you want is a calendar application to pop up. Some mystical application that lets you view upcoming dates, which is iCal on OS X and non-existent on Windows. So, if you want to see what day of the week the 30th of next month falls on, you have to actually change the system date/time to next month. Now of course, if you just hit Cancel, it won’t apply your changes, but sadly, my parents and many others aren’t that savvy and just hit OK when presented with any non-threatening looking dialogs. Additionally, there is no warning that you are making a system wide change.
This ends up, ridiculously, having a pretty terrible impact on the user’s web browsing experience. When my parents attempted to access their bank/credit card website after accidentally setting the system time to a month ahead, all of a sudden, their PC thinks that Amex’s security certificate is invalid and blocks them and warns them that the site is not secure because the system time is ahead of when the certificate expires. This is so incredibly dumb. OS X and most Linux distros gets this interface wrong too. Settings to change the system time should be buried somewhere in system preferences, and arguably, you should be required to have Admin rights to change it. When an end user clicks on that little date/time thingamajig, they should get a calendar application (non-existent in windows), not a date/time settings dialog.
UPDATE: Making this even more ridiculous, I checked out the time sync properties, and it was actually set to sync automatically wint time.windows.com or what have you, and a successful update had been performed on 9/26/08. Awesome. Syncing time from the future!