jQuery FTMFW!
I only just came across this really cool javascript library called jQuery. I'm sure it's been out for ages and every web-developer in the world knows about it except me, but I only just found it and it's friggen cool. Like, REALLY cool. It makes certain functions in javascript a lot easier, but what I like most of all is that it has built in animation functions. Also, they have a UI library that has some cool widgets like a date picker, sliders, etc.
Simply put, my web interfaces are now going to have some super cool animations by simply changing 1 or 2 lines of code.
Check it out at: www.jquery.com.
There's a lot more to jQuery than just the animations and the UI stuff is quite advanced. This is going to be quite a learning curve and I'll get to it all eventually.
Server crashes suck…
Well, last night my server decided to go belly up. But not in the usual way that would make it actually possible to restore quite easily. It appears that my SATA controller has been playing silly games for god knows how long, and has been silently corrupting my datas. I only caught on to it because it started corrupting some pretty major things.
Anywayz, so I finally have most things back online from backups and all that, except one file that is kinda important to Wordpress got totally corrupt and is irrecoverable. The wp_posts.MYD MySQL database file. That pretty much means that all my posts from here are gone.
"So why don't you have redundancy or do backups you idiot douche-bag?" Well, that's the funny thing. I did. The main system where all this stuff is kept was on a mirrored RAID1 array in case anything bad happened. But because it's the controller that went, it wrote corrupt data to one drive and then tried to do a full re-sync on the other causing EVERYTHING on it get blown away. Needless to say, I have ditched hardware RAID and will be going back to more traditional methods of backing up.
Oh well. At least I didn't lose any of my source code or IMAP emails.
The good news is, I was able to recover my important posts from Google's cache. ahha! how cool is that!?!
The Nexus One is officially awesome!
So I've been hanging out for my new phone to turn up for the last week since I did the dodgy and ordered it from the US via an flesh-mail forwarding service. Well, last Wednesday, it arrived, and I've had a few days to play around with it. First off, it took exactly one week (almost to the hour) since ordering it from Google for it to arrive on my desk. Pretty impressive. It actually would have been a day earlier, but it was a public holiday.
So, my initial thoughts on the Nexus One? Well, I've never been as excited about a phone as I am right now. This thing is amazing! The AMOLED screen is everything they said it was, and that is crystal clear with a contrast ratio that is unmatched. Android 2.1 is fast, polished and a dream to use. In fact, to this point I don't have any major gripes about the phone at all. If anything, the only thing I dislike is that the screen gets all smudged from my fingers. No biggie.
Of course, the phone came from the US so I was expecting the usual set up issues with trying to get it to work on Vodafone. Even my old HTC Magic, which I bought in Australia (but not from Vodafone), had some issue getting working on Vodafone.
To my shock and amazement, the Nexus One worked OUT OF THE BOX and I was for the first time ever, able to use the initial Android set up wizard to configure my Google account and sync my contacts, calendar, gmail, etc. Brilliant! So after un-boxing the phone I was up and running with full 3G service in 2 minutes. I love it when things work like that.
Android 2.1 Impressions
Well, I've been using it for almost a week now, and I'm a bit of a power-user when it comes to Android having developed some stuff for Android 1.5, so I like to think I know my way around. Already I can see a vast improvement in everything. It's way more polished than previous versions. The 3D app scroller is a nice touch and works well. I love the animated 'Life Wallpapers', but they really suck up the battery juice, so I've switched to a traditional static image. The 'Car Home' is very convenient and I'm sure that when car accessories start coming out it will automatically switch to that app when plugged in. Messaging now, by default, is on a white background which I prefer as it is easier to read. The Lock screen is A LOT nicer, with a big clock and current battery status by default, or the pattern unluck which I may use one day. The new market (which has been around for a while now but I missed out on with my Android 1.5 HTC Magic) is much better and rivalling the iPhone app store. Although I still dislike the lack of an 'Update All' function when there are multiple apps with updates.
Generally, I'm just VERY pleased with the new OS and can see it only getting better considering how far it has come and how fast. Steve Jobs was have a cry last week about how Google are evil and trying to kill the iPhone. Well, Steve, my little black pot, screw you because the Nexus One is miles better than the iPhone and Android is going to kill off your dumb little cash-cow and no silly little iFad is going to save you.
That is all. I'm off to play with my 'phone'.
I’m getting a Google Nexus One!!!
Ever since I bricked my last Android phone, an HTC Magic, I've been hanging out for the next great Android phone. One that would do everything that I want, and do it well. My requirements were simple. Must run Android 2.0+, have heaps of memory with MicroSD, a decent touch screen and be powered by the 1Ghz Snapdragon processor.
I did think that I was going to be waiting until at least March for the release of the Sony-Ericsson Xperia X10, which looked to be the next killer phone. Then last week, Google decides to drop a bomb on us all and announce that they are releasing for immediate shipping, the Google Nexus One. As it turns out, the Nexus One is everything that I've been looking for in a phone and while the Xperia X10 is surely a mighty little phone, it's just not available soon enough.
So then Google drop another bomb on us Australians by telling the world that they are only shipping phones to the US, UK and Singapore. Bastards! Then again, I'm sure the ACMA has something to do with the hold up. They are a bunch of knobs in my opinion. Either them or the mobile carriers out here are being slow dumbasses as usual. I can say these things because I worked in Telecommunications for 6 years. I've had Optus engineers fall asleep during meetings and while testing out equipment I was trying to get installed into their exchanges. I know how the big machine works.
Anywayz, so there I was all depressed after my little ride on the emotional roller-coaster when I discovered a service called usunlocked.com. Now what these guys do is quite simple. The will supply you with a US shipping address that you can have stuff you buy over there shipped to, and then they will forward it on to you for a small fee. How awesome is that? So I set up an account with them and generated a shipping address for my Nexus One order.
The next problem was that Google know what country my IP address is in and won't allow me to order a phone. I get the standard "Sorry, the Google Nexus One is not available in your country". So I go hunting for a decent proxy server to hide my IP address. Now, the standard web-based proxies won't work as they do too much filtering and re-writing of addresses that they just don't work with Javascript heavy web-services like google. Then I found hotspotshield.com which looked VERY promising. Apparently they are the most well-known VPN proxy service on the 'net and I read many good reviews about them. So I downloaded their software, started it up and BAM, I'm a US citizen. ![]()
So after all of that, I have a Google Nexus One phone on order which should be getting shipped to USUnlocked in the next day or so, at which point they will forward it on to me and I will have it in 3-5 days (so they reckon). I'll let you all know how it goes and then maybe write up a little review on the phone itself.
That is, if I don't get screwed over by someone and end up not getting the thing. Fingers crossed it all goes well.
Merging multiple AVI files into one on Linux
Occasionally I come across AVI files that have been split up, for whatever reason, and I want to put them back into one file. Every time I do, I end up having to dig through tonnes of Google search results to find what I want and then make sense of it. Therefore I decided to figure out the best way to get this work for me and then do this little write up.
What I discovered, is that it's actually VERY easy and you can do it in one command.
Step 1 - Install mencoder
This is easy. Simply execute the following:
sudo apt-get install mencoder
This will install mencoder which is the program we'll use to merge and fix up the AVI files. This will also install any dependencies along with it.
Step 2 - Merge and re-index
This is the meat of it. It's just one command that until now I never knew could actually take multiple files for input.
mencoder -forceidx -oac copy -ovc copy file1.avi file2.avi -o output.avi
This command does a couple of things in one go. Not only will it merge the file1.avi and file2.avi files, it will re-index the streams so that the audio and video are synced correctly. This is usually a problem when you merge files the 'old fashioned' way by simply running cat file1.avi file2.avi > output.avi. Now because this isn't actually changing any of the audio or video data (it's just copying it) this should be quite quick. I merged two ~700MB files and it took about 5 minutes.
You could also, if you want, change the -ovc copy to make it re-compress the video to make the file smaller. So maybe I'll do that in another post.
uShoot – Job management for creatives
Even though I am a software developer by day, in my spare time, I am a freelance photographer (hoping to become full time). Right now, I'm in the process of starting my own business. There are standard things that need to be done such as, business cards; marketing materials; websites; etc. Most are going well, and are either completed or almost done.
However, the biggest pain in the @$$ is finding an accounting software that suits all of my needs. So far, I have not been able to find anything that does everything I need, and in a nice easy-to-use package. Sure, there's Blinkbid, which comes close but is missing job scheduling; then there's Light Blue : Photo, which comes even closer but is expensive and has a very cludgy interface. There are also a few others that exist, but these are designed for large studios with even larger budgets. So, unable to locate the perfect sofware package for my business, I decided to write my own.
Introducing:

The purpose of uShoot is to handle my day-to-day scheduling; estimates; invoicing; and contacts. I'm sure it's duties will grow in the future, but these are my immediate goals for the software. To get the word out there, here are a few features that I already have in mind:
- Web Based - so it will work from anywhere.
- Google Calendar Synchronisation.
- 'T&C in a Can' - allowing Terms and Conditions to be generated in legalese just by selecting a few drop down options.
- Contact Management - hopefully with Google contacts sync.
- Workflow Management.
- PDF Estimate and Invoice Generation.
- Much more...
What's with all the 'google sync stuff' you ask? Well, this is actually the major feature that I wanted from this software, and this is what others don't really do too well, if in fact, at all. With mobile phones talking to 'the cloud' (god I hate that term) more and more these days, it makes sense to have my mobile phone show up my contacts and calendar.
I'm also thinking of offering this as a service, as well as a package for sale. This means, if you don't want to pay a few hundred dollars for it, then you can just pay 10-15 bucks a month and use it over the internet. With this, there can be some multi-user/community stuff incorporated into it as well.
Well, that's it. I really just wanted to get the word out there so that other people in my boat, who are looking for software for a small photography business, can see that there's an alternative solution coming. Feel free to contact me if you have ideas or to express interest.
Update on using kBluetooth
In my last post (Using A2DP Bluetooth in Kubuntu Karmic (KDE)) I mentioned that I used gnome-bluetooth to setup my A2DP headset and then I remove it. Well, I did some more thinking/playing and I have completely switched over to gnome-bluetooth.
So far I haven't noticed and downside, apart from the initial manual configuration.
So, all I ended up doing was
apt-get remove kbluetooth
apt-get install gnome-bluetooth
After that, to get gnome-bluetooth to start when I log in I went into System Settings and clicked the Advanced tab. Then start the Autostart manager and add a program to execute bluetooth-applet and that's it.
Works a treat!
Using A2DP Bluetooth in Kubuntu Karmic
I've been using Kubuntu Karmic on my ASUS G1s notebook for a couple of weeks now and I'm quite happy with it. On the most part, everything "just works".
One thing that didn't work out of the box though, was my A2DP bluetooth headset. I have a Nokia BH-503 that I use quite often while I'm working so it's something I really wanted to get work. Unfortunately, the KDE desktop widget for managing bluetooth still leaves a lot to be desired. At the moment it really only manages input devices, such as bluetooth mice. I found a pretty easy work around though.
Step 1: Install gnome-bluetooth because kbluetooth is lame (for now)
Now, because kbluetooth is pretty lame when it comes to this stuff, the easiest thing for us to do is ditch it and install gnome-bluetooth which is a lot more mature and can set up devices other than input devices. So:
sudo apt-get install gnome-bluetooth
It will probably try and install some other stuff that it needs, so let it. Once that's done, you'll need to run it manually to start it up as it won't put anything in KMenu.
Step 2: Run gnome-bluetooth and pair your device
Running it is easy, despite the executable not being called gnome-bluetooth. Just run:
bluetooth-applet
and it will popup in the widget tray. Left click on it and select Setup new device. Just follow the wizard and pair your device. This will be different for every device so I won't go into any detail here, other than to say, put your device is discover mode and it should find it.
Once it's found it, you should see your headset in the devices list of gnome-bluetooth's popup menu. Strangely enough, that's all we need gnome-bluetooth for. You can now pretend it doesn't exist for all intents and purposes (you can even uninstall it if you really want. I did).
NOTE: Funnily enough, if you still have kbluetooth running you can see your A2DP audio device in the devices list in there too!!!
Step 3: Get PulseAudio up and running
To get the audio component working, we need something can intercept the audio and send it to the headset. This used to be done with bluetooth-alsa which was part of the BlueZ project. But this required a whole lot of messing around with config files and once it was setup, you had to manually switch between audio output devices should you want to use something besides your headset.
The elegant solution is to use PulseAudio to handle audio in KDE. This is really easy to get up and running and pretty much just requires you to install the pulseaudio and pulseaudio-module-bluetooth packages and reboot so everything starts up correctly. There's also a bunch of config utils that make working with PulseAudio a lot easier so we'll install them too. So from a command line, simply:
sudo apt-get install pulseaudio pulseaudio-module-bluetooth padevchooser paman paprefs
Of course, this will probably try and install a whole bunch of other dependencies, so just let it. As far as I can tell it's all just libraries and stuff. Once this is done, it easiest just to reboot and let pulseaudio start up and load all it's modules.
Step 4: Listen to music
That's pretty much it. Once you have rebooted you can log back in and just set your audio device to use PulseAudio (in system settings). Initially your audio will still come out of your default device, but if you run pavucontrol or from kMenu Pulse Audio Volume Control you have complete control over everywhere your audio comes from and goes to. Pulse is actually pretty cool.
Anywayz, if everything worked, in pvaucontrol the Configuration tab should show your A2DP device. If it has selected the HSP profile in the dropdown box, simply select the A2DP (it will remember this). Now, while audio is playing you should be able to select your headset as the audio output device.
Alternatively, you can setup and use padevchooser to select your audio server and output device, but I'll leave that for a later post. ![]()
The coolest part of all this is that PulseAudio will seamlessly switch between output devices. For example, I have my A2DP headset set up as my default device for Amarok. So I can start playing music and it will come out my crappy laptop speakers. But if I turn on my headset and it connects the audio will automatically switch to there. I don't even have to stop the currently playing audio track! The opposite also works where if I turn off my headset, audio switches back to my speakers. Pretty cool!
Hope this helps someone out there.











