Monday, August 20, 2012

Loading jquery/javascript libraries from CDN if online etc local

I added some local flags too to enforce local loading : if they're not present then normal offline/online checks are done on the first library in the onlineJavaScriptLibs array. Short and sweet. See the code image here. I realise that the test for the first jquery lib using fopen doesnt gaurentee the others are there but if thats not there there are worse things. I could check for each and every library but meh. Even then php pass doesnt really guarentee the client can access the online library. The fopen checks looking for offlinejs work on a per web (custom/offlinejs) or on an all web (lib/offlinejs) and is really there for people testing/running my framework using a local code base where they might be offline. I had tried the method of loading jquery and then checking in javascript if window.jQuery was defined but simply couldnt get the document.write() method working : I then tried using jquery to append newly constructed script/link objects to body for the offline/onlie scripts but , well, it simply didnt work. Work effort v covenience v results.

Tuesday, February 14, 2012

de-mothballing my Thinkpad T60

I switched on my T60 last night : it hasnt been used since May 2011. Some
maintenance required. Amazingly the Linux way was so SO much quicker despite
more needing to be done : it having a lot more config changes to put it
inline with my netbook. The Debian installation first needed to be upgraded :
sudo aptitude update, sudo aptitude upgrade. It took about an hour to download
and install the huge amount of upgrades to Debian Squeeze since May. It worked
I then had to install Dropbox, sync it and link all my bash type control files
to the Dropbox equivalents. That took about 45 minutes. This included all GnuPG
data for secure encryption etc. Worked fine.
Finally clone the GIT repo containing various web stuff and restore the MySQL
databases : that took 2 minutes.
Restarted (there were new kernels installed too) and .. worked flawlessly.
Alas, Windows XP : nothing much to do per se (I dont do any development on it
and its usually just an iTunes host) but it needed 5 reboots and only after each
reboot did it then decide various other pakages needed upgrading. It took 5
hours with NO system reconfig on my part. Even now it takes 3x longer to be
ready to work on after booting up.

My Emacs Files At GitHub