Sunday, June 21, 2009 at 11:07AM
Every javascript programmer at somepoint finds themself in a situation where they need to undo the effects of a packer or minifier on their code. Javascript Beautifier to the rescue.

It lets you cleanup the super scrunched up code into something more readable. This enables you to recover your source files if you lost your originals or dig through someone elses code and get a better idea of how other people in the real world are coding.
Saturday, June 20, 2009 at 1:40AM
Everyday I log into Passpack and leave it open all day. So here’s the problem after having Passpack open for a while I get the following message (it is extremely annoying as it interupts whatever else your up to on the net). This only happens for me in Chrome. It works like butter in Firefox and I can’t speak for IE.

The initial trigger for the message seems to be random. But after it initial message is seems to come back around every 3 minutes. So I did some digging. After poking around in the source I discovered that they’re using an older version of Tako Sano’s jQuery history plugin.
So I added some code to the historyCallback do some logging so I could get a better feel for what was going on.
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
| errorOccurred = lastErrorOccurred = new Date().getTime();
_back = function(h) {
if (_backOk) {
if (_backCallback) {
_backCallback();
_backCallback = null;
}
var hh = parseInt(h);
var m = $.browser.netscape ? 2 : $.browser.msie ? 3 : 7;
if (hh > m) {
errorOccurred = new Date().getTime();
console.log("hh: "+ hh +", m: "+ m +", delta: "+ (errorOccurred - lastErrorOccurred));
lastErrorOccurred = errorOccurred;
alert(PP.msg.man.bac);
}
}
}; |
After letting this run for a while I started to see a pattern. Here’s an excerpt of the results.
- hh: 8, m: 7, delta: 209901 (~3.4 minutes)
- hh: 8, m: 7, delta: 200888 (~3.3 minutes)
- hh: 8, m: 7, delta: 190944 (~3.2 minutes)
- hh: 8, m: 7, delta: 183514 (~3.0 minutes)
- hh: 8, m: 7, delta: 197517 (~3.3 minutes)
For webkit (Chrome/Safari) based browsers the jQuery history plugin manually creates a stack to keep track of the history. So this is where I believe we are encountering the problem. If you look at line 4426 you can see that we create a history with a stack length of 9.
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
| _back = function(h) {
if (_backOk) {
if (_backCallback) {
_backCallback();
_backCallback = null;
}
var hh = parseInt(h);
var m = $.browser.netscape ? 2 : $.browser.msie ? 3 : 7;
if (hh > m) alert(PP.msg.man.bac);
}
};
runHistory = function() {
$.historyInit(_back);
z = $.browser.netscape ? 2 : $.browser.msie ? 4 : 8;
for (var j = z; j >= 0; j--) $.historyLoad(j);
_SetTimeout(function() {
_backOk = 1
},
3000);
}; |
But on line 4419 we are working with a stack with a length of 8.
4419
| var m = $.browser.netscape ? 2 : $.browser.msie ? 3 : 7; |
Shouldn’t this read as follows?
4419
| var m = $.browser.netscape ? 2 : $.browser.msie ? 4 : 8; |
Saturday, May 2, 2009 at 2:32PM
So your at work and you really want to watch that YouTube video your buddy sent you. But you can’t cuz YouTube is blocked. Well I’m here to show you how. This builds on a previous post I did about listening to Pandora in Canada. Your using the socks proxy we setup before but you still can’t watch YouTube clips because their being blocked at the DNS level. Nothing we can do about that right? Wrong. Lets configure Firefox to send DNS requests over the socks proxy. There by circumventing the DNS blocks at work.

In Firefox type about:config into the address bar. Now type dns into the filter. Double-click on the network.proxy.socks_remote_dns to configure Firefox to send our DNS requests through the proxy. Voila! We can now laugh it up watching YouTube clips to our hearts content.
Saturday, February 7, 2009 at 11:32AM
So you looking at this sketchy file you just downloaded and your a little nervious about running it because you don’t using any antivirus software. What do you do? Ususally just run the file and hope for the best. Well no more, welcome Virus Total. All you doing is upload the file to Virus Total. They scan it with 39 different antivirus engines and give you the results.

A great solution for scanning those small sketchy files that all of us end up downloading at some point to get our software to work they way we want it to.
Sunday, January 4, 2009 at 3:28PM
I’ve been playing around with Windows 7 for a while. Just recently I updated my install to the Windows 7 Beta 1 (Build 7000). When I was coping over my iTunes library I noticed something kind of cool going on in the taskbar. While the files were transfering in a mini progress bar was displayed behind the Explorer icon in the taskbar.

It’s the little things like this that make Windows 7 really cool. I won’t talk about it too much right now but what makes Windows 7 worth while for me is the new Explorer interface. So much better than Vista’s Explorer interface.
Friday, December 19, 2008 at 12:29PM
Have you ever wondered what your website looked like in other browsers or even in other operating systems? Well the answer is here, browsershots.org. Browsershots is a free and open-source online service which generated screenshots of your website: in different browsers, on different platforms, and with different plugins. It’s a true amazing service. It’s a must for every web designer’s arsenal.
Thursday, December 4, 2008 at 7:03PM
If your like me you absolutely love the Pandora music service. However due to greedy music labels pushing their agenda in Washinton (see SaveNetRadio.org) Pandora was forced to limit its service to the US. What’s a geek to do? Why… use an ssh tunnel to proxy the Pandora service through a US server. How? You may ask.
First we’ll setup the ssh tunnel. For that we’re going to use an application called Putty. To setup the ssh tunnel you’ll need to have access to a server based in the US with ssh enabled (for example – a Dreamhost account). For the purpose of the tutorial we’ll call the server “example.com”. After launching Putty you need to enter the hostname into the field provided. Now comes the magic. Expand the SSH category and select Tunnels. Under source port enter 8080, select the “Dynamic” and then click the Add button.

Click on the Open button. After click on Open you’ll be prompted for your username and password for, in the case of this example, example.com. After successful establishing your ssh connection all you have left to do is setup Firefox to use this ssh tunnel as a proxy.
Open up Firefox and select “Options” from the Tool menu then click on “Advanced”. Next click on the “Network” tab, then the “Settings” button. Select “Manual proxy configuration”. Now comes the important settings. Erase the HTTP Proxy, SSL Proxy, FTP Proxy, and Gopher Proxy fields. Enter 127.0.0.1 under SOCKS Host and 8080 under Port.

Click OK and click OK once more. We’re done! Browse to www.pandora.com and crank the tunes.
Monday, December 1, 2008 at 5:54PM
I’ve been using Chrome (from the Dev Channel) pretty much since it was released. And I absolutely love it. Don’t get me wrong I still like Firefox and Firebug can’t be beat. So today I was using the search function and I noticed something really cool. Your search results show up in your scrollbar. It’s like a map of your search results! Checkout the screenshot for yourself.

That is so useful. I’m keeping my eye on that Dev Channel rss feed waiting with baited breath for what is going to come next!
Tuesday, September 16, 2008 at 12:46PM
Thee best email service anywhere. I can’t imagine my life without Gmail anymore. It is awesome in so many ways and has so many hidden features and functionality that I can’t believe it’s free.
Recommended settings and configuration for IMAP
Thunderbird Add-ons
If you want Thunderbird to check all of your folders for new messages try adding user_pref(”mail.check_all_imap_folders_for_new”, true); to your user.js or pref.js
Thursday, January 31, 2008 at 10:57PM
So you bought a butt load of music off iTunes in the old DRM 128-bit AAC format. Now that iTunes is selling DRM-free 256-bit AAC music what do you do with those old crappy DRM’d files? Well the good news is that you can upgrade them. The bad news is that it will cost you $0.30 $0.40 / track. But if you still want to do it, here’s how.
- Make sure that you have iTunes Plus enabled for your iTunes account. You can do this from your Account Settings page in iTunes.
- Now go to the iTunes Plus section in the iTunes Music Store. You’ll in the top left corner you will see a box with the words Upgrade My Library. In that box it will tell you how much it will cost to upgrade your library.

- Click on See Details, and the click on Buy.
- Now all the new DRM-free versions of your music will be downloaded