Posts By: jonny

mysqldump

Basic Usage: mysqldump -u root -pSECRET –quote-names –databases  mydatabasename > mydatabasename.sql If find it best to include the –databases switch as this will add the ‘DROP DATABASE’ and ‘CREATE DATABASE’ statements when restoring – proceed carefully.Quote Names:Quoting the file names can be an insurance against users who may have created field names with spaces in… Read more »

Redirecting Mobile Web Users

There are a few potential methods for this, but the first worked fine for me.1. Apache Mod_Rewrite RewriteEngine On#redirect mobile browser using HTTP_ACCEPT headerRewriteCond %{HTTP_ACCEPT} “text/vnd.wap.wml|application/vnd.wap.xhtml+xml” [NC]RewriteCond %{HTTP_HOST} “!m.yourmobileurl.com” [NC]RewriteRule (.*) http://m.yourmobileurl.com/$1 [L]#some high-end phone sometimes support HTML, only its sucks#add more browser user agent sig hereRewriteCond %{HTTP_USER_AGENT} (nokia|symbian|iphone|blackberry) [NC] RewriteCond %{HTTP_HOST} “!m.yourmobileurl.com” [NC]RewriteRule (.*)… Read more »

Opera Mini on Ubuntu

I’m using Ubuntu 9.04 and I wanted to be able to run Opera Mini for testing web sites: Download MicroEmulator from here (or direct version 2.0.3) Extract the tar file and run the jar with: java -jar microemulator.jar In the Window that opens from the menubar choose Options > Select Device > Add Browse to… Read more »

Apache DirectoryMatch for Intranet-Style Access

I needed to ensure that within a rather large directory structure any directory named ‘intranet’ was only accessible by internal IP addresses. Although from a security perspective this is not truly intranet it is what I was asked to do./var/www/vhosts/mydomain/httpdocs/ represents the DocumentRoot for the virtual host.  This will protect /any/path/with/intranet/in/the/name – so intranet is… Read more »

Shutting Down Solaris 8

I was trying to shutdown an old solaris box with: shutdown now Obviously not the right thing to do as I got output similar to this: Shutdown started.    Mon Oct 19 11:58:55 BST 2009Broadcast Message from root (pts/1) on apu Mon Oct 19 11:58:55…The system myhostname will be shut down in 1 minutenowrwall: Can’t send… Read more »

Apache DirectoryMatch for Intranet-Style Access

I needed to ensure that within a rather large directory structure any directory named ‘intranet’ was only accessible by internal IP addresses. Although from a security perspective this is not truly intranet it can help protect some pages./var/www/vhosts/mydomain/httpdocs/ represents the DocumentRoot for the virtual host.  This will protect /any/path/with/intranet/in/the/name – so intranet is in there… Read more »

Install RealPlayer on Ubuntu (9.04)

I wanted to try out Real Player on a radio station stream so … Visit: http://www.real.com/linux Click the Deb download link and Open with the GDebi Package Installer as prompted. The installer may pause so click the ‘Terminal’ arrow and type 1 then press enter Run Real Player from the menu ‘Sound & Video’  

Easy Peasy on the eeepc

I decided to have a play installing Easy Peasy on the 7″ eeepc I borrowed from my sister.Setting it up was quite easy:1. Download the iso (at a whopping 800Mb)2. Download the helper script, make it executable and run it3. Choose the iso and specify a USB drive to install the easy peasy live distribution… Read more »