Posts Tagged tips
Getting Audiogalaxy running on Ubuntu 11.04
Posted by George Nixon in Tips and Tricks on 10 October, 2011
I recently started using Ubuntu as my main OS, and in fact I successfully chmodded something for the first time today, so I’m not exactly an expert. But this was painful so once again, hopefully I’ll save others some time by writing it up.
Audiogalaxy is a platform for streaming your music from a pc to any number of other web-enabled devices (web browsers, smartphones, tablets). It’s not supported for Linux yet, but I found this post encouraging me to try using WINE (WINE Is Not an Emulator, as if that clears anything up
). so I gave it a go.
It installed just fine with WINE, but then sat there doing nothing. It didn’t seem to notice any music files that it would be able to stream. I checked that WINE was set up, and indeed the fake Windows filesystem in ~/.wine/drive_c/users/MY_USERNAME/My Music was a symlink (I think!) correctly pointing to my actual music directory (~/Music).
As the post above alludes to, I had to “hack the sqlite”, but I had to take a guess at what that meant. It’s working for me, but use at your own risk. I don’t even know what the “download” column in the appropriate table is for, so if at some point it chooses to overwrite your files with new downloads… let’s just say backups are important. So, that said…
Update: have a screenshot, on the house:

Uploaded with Shutter. Hosted by ImageShack.us. Click to make big.
- Close the Audiogalaxy helper, if it’s open.
- Open the file ~/.wine/drive_c/users/YOUR_USERNAME_HERE/Local Settings/Application Data/Audiogalaxy/ag.dat with your favourite SQLite browser thing (never having used one before, I picked Sqliteman from the Ubuntu Software Center, which worked just fine).
- Find the table called shares_v1, and add a row (the table was initially empty for me, which suggested I’d found the issue!) with the values “C:\users\YOUR_USERNAME_HERE\My Music” in both “path” and “downloads” columns. Commit the change to the database if you haven’t already.
- Start the Audiogalaxy helper again.
- Hopefully now if you go to Audiogalaxy.com and log in, you’ll see your collection is starting to fill up with music! Play something triumphant and bask in the glory of success. Well, that’s what I did, YMMV.
Playing Sounds in Phonegap on iOS
Posted by George Nixon in Tips and Tricks on 13 September, 2011
I’ve worked out that iOS is pretty funny about sounds, especially as it turns out Safari makes it very difficult to play them automatically, thus saving on users’ precious data usage plans (never mind the fact that my sound effects are already downloaded onto the device and are smaller than your average jpeg anyway!). It’ll do it in response to a user action, but that’s such a woolly and undefined concept that I had to fiddle around for a while.
I didn’t have any luck using the usual Phonegap methods. Well I did but it only worked when headphones were plugged in, for some reason, and I eventually gave that up as a dead end. It appeared to play the sound, firing onSuccess callbacks and such, but I couldn’t hear anything, thus rather defeating the point of the exercise.
Anyway, here’s an example of what didn’t work for me, followed by one that did. Hope it’ll save you some silly bother.
Doesn’t work:
var myAudio = new Media('sounds/mySoundFile.wav');
myAudio.play();
Works:
<audio src='sounds/mySoundFile.wav' id='sound'>
<button id='myButton' onClick='document.getElementById("sound").play()'>
If like me you prefer jQuery to the monstrosity we like to call raw Javascript, it would appear that inside your click() function you’ll need to use $(‘#sound’)[0].play() rather than $(‘#sound’).play(). I think that’s because then you escape the jQuery-ness and call the DOM’s native play() method on the <audio> element itself, not some set of jQuery-enhanced elements.
So, that was nice and straightforward, thanks Apple!!! In case you can’t tell, I’m being sarcastic
prevPage / nextPage in jQuery Mobile
Posted by George Nixon in Tips and Tricks on 4 July, 2011
Quick snippet in case this helps somone, because I’ve been stuck for an unreasonable amount of time on something that should have been straight-forward!
If you’re using the pageshow or pagehide event handling in jQuery mobile, you can find out which ‘pages’ the event is switching between. We can then inspect the object to find out the id of the page. First declare your function with two arguments as such:
function(event, ui) {...}
Now interrogate the passed “ui” variable as such (edit: updated to be much simpler):
$(ui.prevPage).each(function (){alert(this.id)})
ui.prevPage[0].id
I finally worked this out with a bit of reflection. To get more info about the ui.prevPage object, try passing it to this function:
function var_dump(object) {
for (var member in object) {
alert('Name: ' + member);
alert('Value: ' + object[member]);
}
}
An alternative, and actually what I’d now recommend, would have been sticking a breakpoint inside the function and examining the “ui” object from your debugger (Firebug, WebKit Developer Tools, etc).
CRM 4.0: QueueID = {00000000-0000-0000-0000-000000000000}
Posted by George Nixon in Tips and Tricks on 23 January, 2011
Took me a few hours to work this one out yesterday, so I thought I’d post it here in case it helps anyone.
I was getting an “generic sql error” from CRM, and when I used the trace program to figure out what was going on, I discovered our software was trying to insert a new CRM activity to a queue that didn’t exist. The QueueID was {00000000-0000-0000-0000-000000000000}, and there was no queue in the database with that ID.
What happened was that the service had looked up its own details with a WhoAmIRequest, and then tried to insert an activity into its own private queue before moving it to a public queue so other users could see the task.
After some digging, I found our Windows service was logged in as the default “Local System” user in Services.msc. When we were running that service on other deployments, the service had its “Log On As” set to a domain user which was mapped in CRM. This was not the case in the current deployment, so as soon as I fixed that, the service started working as expected.
The best course of action here is to set up a generic domain user in Active Directory (called “CRM Service” or similar) and create a User entity in CRM with those domain credentials, and ensure it has the necessary role privileges to carry out the actions you want (or just set it to System Administrator if you’re confident it’s not going to do any damage!). Logging on as a particular user, such as yourself, might cause problems if your password changes, or heaven forbid, you leave the company you’re working for!
Note that the First Name and Last Name you give the service will, by default, show up as the owner of the new activity.
Thompedia! – a wiki for the Thomson DTI 6300
Posted by George Nixon in Links on 14 December, 2009
As I’m back home using my Thomson PVR, a Thomson DTI6300-16, and needed to look up some stuff on rejigging the remote control for a new telly, I was reminded of Thompedia (link below). It’s a wiki for the fallible but popular (not with its users!) Tivo-style device written by chris6 from Kafkas’ World, home of an unofficial Thomson support site I’ve frequented whenever the damn thing stops working. Ages ago, I took it and did the formatting to make it a proper wiki site. I’m just giving it a shout-out here in case it boosts its traffic slightly, as it’s a useful guide and doesn’t look like it’s had many updates lately, indicating a lack of visits. Either Thomson finally fixed the thing (unlikely) or it’s not getting the visitors it deserves, so without further ado:
Thompedia – help, support and useful links for the Thomson DTI-6300 Top-Up TV TUTV digibox
PS: This is my first post in six months – I’ve not had much to say as my second year university stuff wouldn’t interest many people. Perhaps when I have free time to work on my own projects, that’ll change. We have all these interesting books in the library on extra-curricular topics like Ajax that I don’t usually get time to read, so I might try some out and have some updates for you over this break, between revising for my exams. No promises though!
How to Mute Adverts in Spotify
Posted by George Nixon in Tips and Tricks on 6 July, 2009
I realise I may be shooting myself in the foot, revealing this tip – if word gets out, I’m sure the Spotify team will patch it immediately – but I’ve found a way to quieten those pesky commercials.
If you’re not aware, Spotify is a free music streaming service that you browse with a super-fast, proprietary media player. It boasts millions of tracks and many thousands of albums, playing at high quality and with instant access. The price you pay is occasional adverts, which are significantly less frequent or annoying than those on commercial radio. They are still quite annoying though, nonetheless. And, cleverly, turning the volume down actually pauses the ad, so you’ve no choice but to listen to it. Until now.
So here’s what you do: when the advert starts playing, hit pause. You can then turn down the volume on the player and press play, and the advert will resume playing silently. You can watch the little timer to see when it’s done, and then just turn the volume back up. I haven’t tried pausing and then using the system volume to turn down the sound, so I’ll report on that soon.
Before I go, I’d just like to plead with Spotify to open-source the software, so people like me can start making add-ons for it, just like with Songbird. Your service has rocketed in popularity, leaving a small team to service over a million users. Right now, all we want is an equaliser. Oh and a lyrics plug-in. And not to mention…! So open-source the player and we’ll fill in the gaps. Come on, you know it makes sense.
edit: this article used to be titled “How to Mute Adverts in Spotify – July 2009″. However, as of April 2010, this technique still works just as well as it ever did – Spotify have taken no actions to close this loophole. I’ve taken the July part of the title out in order to make it obvious that the article is still relevant today.
Squeaky Xbox 360 Controllers
Posted by George Nixon in Tips and Tricks on 18 May, 2009
Just a quick note to let anyone out there who’s just bought a brand new Xbox 360 and shock! horror! the control pad thumbsticks and triggers squeak. Mine did, and I was worried that if I didn’t return it and get another, I might be stuck with noises every time I navigated a menu. Anyway, my message is: don’t fear! After a few weeks of infrequent use, the noise has gone completely. I guess that whatever was causing the friction has worn away enough to make for smooth movement now.
Mouseless browsing and Ctrl-K in Opera 9
Posted by George Nixon in Tips and Tricks on 2 March, 2009
The Opera web browser has now firmly been edged out for me by Firefox 3 after many years of fine service. The latest Firefox is a great browser, and with extensions like Greasefire for easy website customization, Delicious.com web bookmarks integration and instant picture editing with Picnik, it’s becoming increasingly difficult to walk away from.
There’s still life in an old dog yet though. Opera does one thing much better than FF – mouseless browsing. I’ve tried – and failed – to find anything like it in a Mozilla addon. Simply put, holding down the shift key allows the user to flit around a page, going from link to link with the cursor keys. Hitting Enter then takes you to that link, and the process repeats. It’s massively intuitive, and it works really well. Since getting a gorgeous new Samsung NC10 netbook whose only drawback is a slightly scrawny touchpad, I’m finding this gives Opera a new lease of life. Boot it using Launchy and your fingers never leave the keyboard.
Perhaps a just tribute to the impact and influence Opera had as a forerunner to Firefox, it’s very easy to go back to Opera and use mostly the same keyboard shorcuts you currently have ingrained into your muscle memory. The only significant change for me is that Ctrl-L still takes you to the location bar, while Ctrl-K tries to open your email instead of the search bar. Dear Reader, fear not, for I have a solution.
To alter the behaviour of Ctrl-K in Opera, go to Tools->Preferences, switch to the Advanced tab, and select Shortcuts down the left-hand side. In the Keyboard pane (below the Mouse pane), click Edit… for the profile you want to change (probably your current one). Type the letter ‘k” in the search box, and look down the list until you see an entry on the left that reads ‘k ctrl’, or ‘ctrl k’. On the right is its current assigned function, which should say something about mail. Double-click the function and start typing “focus search field”. The auto-complete should be able to fill the rest in for you.
Et voila! Ctrl-K now takes you to the search bar as expected. You can now effortlessly browse websites using just your keyboard, and pretend you’re still in Firefox!
Update 14/3/09: I’m finding some other useful tidbits and thought I’d share them, though they’ll probably elicit a ‘duhh’ from many readers. First, shift-enter opens a link in a new tab. Second, ctrl-enter is the equivalent of hitting the Wand button. And third, I previously thought that Opera popup dialogues were mouse-only affairs, since they had no obviously associated keys like alt-s to ‘Save’, and hitting the cursor keys did nothing. Well you can use tab to cycle round the options. Still nasty, so let me know if you have a better way.
There’s an official guide, Use Opera Without A Mouse, but frankly the tutorial is about 10 times longer than any time-saving technique ever warranted.

