To fix this issue simply install the Ubuntu Restricted Extras package, and everything will work as you’d expect.
The reason this isn’t installed by default is because MP3 is proprietary and yucky.
Leave the first comment ▶To fix this issue simply install the Ubuntu Restricted Extras package, and everything will work as you’d expect.
The reason this isn’t installed by default is because MP3 is proprietary and yucky.
Leave the first comment ▶There are a shed-load of forum posts on the web from people who simply cannot get their wireless working with their lovely new Dell laptop. None of which are particularly helpful or give any clear steps that allowed me to resolve my problems with my Dell Studio 15 and 1397 mini card (which is actually made by Broadcom).
I tried both the STA and other proprietary wireless drivers that Ubuntu offered me. But none of them would work. Little did I know that the STA driver works fine, it just conflicts with other kernel modules which get loaded before it during boot.
If you are in a similar situation and are close to pulling your hair out, no worries, here is how I got it working:
PRE-STEP: Make sure you have un-installed all proprietary drivers which are related to the wireless hardware in System > Administration > Hardware Driver. (If you have a fresh install of Ubuntu and haven’t been trying to get ndiswrapper etc.. working already none of these should be activated).
If you have installed ndiswrapper and a Windows driver you can un-install this by typing:
$ sudo ndiswrapper -e driver_name_here
$ sudo rm /etc/modprobe.d/ndiswrapper*
Open a terminal window (Applications > Accessories > Terminal) and type the following:
$ sudo lspci -nn | grep Broadcom
Enter your password. You should then get a line back describing your Broadcom wireless hardware. Mine looks like this:
$ sudo lspci -nn | grep Broadcom
04:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g [14e4:4315] (rev 01)
If you don’t get anything back, or the line doesn’t describe your wireless card, this tutorial will not work for you. Sorry & best of luck elsewhere!
First reboot the machine so you don’t have any pending module changes, then go Applications > Accessories > Terminal. Type the following (ignore the $ at the front, this is to confirm you are typing into the bash shell and not stdin of an app):
$ sudo lsmod
Near the bottom you will probably see a line that starts ssb? If so, your machine thinks ssb and b43 are the correct modules used to control your hardware. These will not work! We now need to disable these. At your Terminal type:
$ sudo gedit /etc/modprobe.d/blacklist-custom.conf
A text editor will appear. Type the following in:
# /etc/modprobe.d/blacklist-custom
blacklist b43
blacklist ssb
Save the file and then close it. These pesky critters can’t be a pain any more as we have just black-listed them from being loaded on boot. Murhaha!
We now need to install the Broadcom STA driver which does work. Plug an ethernet cable into your computer and go Applications > Administration > Hardware Drivers. You should then be presented with a number of drivers. Activate the Broadcom STA driver and reboot your machine.
You should now have working wifi!
I’m on the hunt for some text editor gurus to participate in an online video show-down; putting masters of these tools head-to-head to see who performs the best!
On a more serious note..
When I started showing interest in using a “proper” text editor, there was a myriad of flame wars of non-sensical, non-logical arguments which plagued the forums. I understood that using one of these *could* save me time, but there were no videos of amazingly talented people using these editors. I *needed* something to inspire me to spend my time learning it, but I never got it. I just had to take the risk, and now I’m glad I did!
The main aim of the site is to showcase how amazingly useful these tools are, and to inspire more people to use them; under the guise of a competition!
If we can get some sponsors, there might even be prizes for the top-dogs!
Please email me on tom[at]tommed.co.uk if you are interested!
Many Thanks,
tommed
My main web server is a PPC MacMini running Apache on ArchLinux. The machine is starting to reach it’s limits with the amount of programs and web sites running on it, so I needed to start off-loading some of the sites to another box.
To make these sites available to the outside world, I have chosen to use ReverseProxy (mod_proxy) to proxy the site from the external request onto the new server.
Unfortunately, Plogger makes heavy use of $_SERVER['PHP_SELF'], so when you run Plogger through ReverseProxy, you get redirected to an incorrect path and 404s start appearing everywhere.
<VirtualHost *:80>
ServerName www.external-url-to-plogger.com
DocumentRoot /srv/http/dummydir
<Location />
ProxyPass URL_IN_YOUR_HOSTS_FILE_FOR_SERVER2
ProxyPassReverse URL_IN_YOUR_HOSTS_FILE_FOR_SERVER2
</Location>
</VirtualHost>
switch($level) {
// Admin section for generate_url
case 'admin':
$rv = '/plog-admin/plog-'.$id.'.php?'.substr($args, 5);
break;
// Front end section for generate_url
case 'collection':
$rv = '?level=collection&id='.$id.$args;
break;
case 'album':
$rv = '?level=album&id='.$id.$args;
break;
case 'picture':
$rv = '?level=picture&id='.$id;
break;
case 'search':
$rv = '?level=search'.$args;
break;
case 'collections':
default:
$rv = 'index.php';
if ($query != '?' || !empty($args)) {
// remove & from the end of $query...
$query = str_replace('&', '', $query);
// remove & from the beginning of $args if no previous query set
if ($query == '?') {
$args = substr($args, 5);
}
// append the $query or $args
$rv .= $query.$args;
}
break;
}
Now Plogger should work from the internet! Feedback welcome!!
Leave the first comment ▶I was recently working with the Arduino and an 8×8 LED matrix and attempting to figure out an easy and clean way to convert co-ordinates into matrix positions. I decided that as each LED in the matrix can only have two positions, that I could create an array of 8 binary blocks each with 8 bits.
So if I gave a row the binary data: 01010101, I would see every other LED turned on.
My problem came when I attempted write the code that takes the binary block and figures out which LEDs need to be turned on in the matrix. Back to old-school programming I guess!
The trick is to shift to the correct column and then mask the value using the and-bitwise operator:
The following code is written in ruby to help explain the technique clearly..
binary = 0b010101 columnInterestedIn = 1 /* first column from left to right */ isSwitchedOn = (binary >> columnInterestedIn) & 1 == 1
Simple eh?! The actual C++ code that ended up on the Arduino looks like this:
int bitData = (data[columnIndex] >> rowIndex) & 1); if (bitData == 1) digitialWrite(rowPins[rowIndex], HIGH);Leave the first comment ▶

Google Go was announced just a few days ago and I’ve been trying to figure out how to write a Twitter client since then (Think of it as the 21st Centry version of Hello World!
).
My biggest stumbling block was that currently Google Go was unable to send http requests with an Authorization header using the current http package implementation. After looking through the code I realised that the logic I needed was there, it just wasn’t exposed (as the library is still in early stages of development).
func send(request *Request) (response *Response, err os.Error) { ... }
The function send shown above was just what I needed! So I replaced all occurrences of send with Send (which makes it public) and was able to call it from my own Go code using http.Send(...). Hurray!
The client is now complete and even includes a command line interface. I will hopefully add a web UI later on (probably when the Google Go team have finished implementing cookie handling).
Once built, you can use the command line client like so:
$ # update your status
$ ./twitter-client -u myusername -p mypassword -s "This #GoogleGo #Twitter client created by @tmedhurst is fab!"
$ # check your direct messages
$ ./twitter-client -u myusername -p mypassword -dm
$ # check your main timeline (similar to the home screen on the Twitter web site)
$ ./twitter-client -u myusername -p mypassword -f
$ # show my recent posts
$ ./twitter-client -u myusername -p mypassword -t

I will eventually allow you to point to a file (which you can chmod 600 to make secure) which contains your username and password (just like a passwd file) to save you entering this information in each time.
The client is only available for x86/x64 intel macs and x86/x64 intel and arm Linux machines (as that’s all that Google Go supports at the moment). The Windows version will be available when Google Go is made available to Windows. (I’ve tried building it in Cygwin.. but no luck I’m afraid :’( ).
The client/package is available on GitHub here.
It is licensed under GPL so you can do what you like with it as long as you adhere to this license.
If you wish to use this in a commercial platform; commercial licenses can be purchased, please contact me for more details.
If you would like to make a donation to this project, please consider donating £3 or whatever you wish for beer money! Many Thanks!!

Easily blue screen any Windows Vista, 2008, and 7 box which has SMB allowed through the Firewall (All but Windows 7 have this turned on by default!).
Here is the script:
download bluescreen_windows.py
CKEditor is a fantastic open-source WYSIWYG editor. However, it is unfortunately quite difficult to extend as there is very little documentation ready for CKEditor (the available stuff is for the older version: FCKEditor, which is very different).
But fear not my fellow readers; for I have managed to figure out how to create an iframe-based plugin (perfect if you want to use your old dialog-based fckeditor plugins in ckeditor)!!
The first step is to add your plugin into the toolbar settings. In the example below, my new plugin is called uploader and will be a replacement for the rubbish image uploader that comes with ckeditor:
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.toolbar = 'MyToolbarSet'
config.toolbar_MyToolbarSet =
[
['Cut','Copy','Paste','PasteFromWord','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['NumberedList','BulletedList','Outdent','Indent','Blockquote','RemoveFormat','Source'],
['Link','Unlink'],
['uploader','Table','HorizontalRule','SpecialChar'],
'/',
['Bold','Italic','StrikeThrough','-','Subscript','Superscript'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Format','FontSize'],
['FitWindow','ShowBlocks']
]
};
As you can see, I have placed my ‘uploader’ plugin next to the ‘Table’ button.
The next stage is to create a folder for you plugin. This folder needs to be called the same as the plugin name (in this instance we must call it ‘uploader’). You will then need a file called plugin.js inside this folder and a folder called dialogs, where all your dialog pages go.
For this example we will reference a dialog page called upload.html, which also requries a script file called upload.js. I have also added a PNG icon which will appear on the toolbar as the button to launch my dialog.
ckeditor
-- dialogs
-- upload.html
-- upload.js
-- images
-- icon.png
-- plugin.js
Now to put some content in the plugin.js file in your plugin folder…
CKEDITOR.plugins.add('uploader',{
requires: ['iframedialog'],
init:function(a){
CKEDITOR.dialog.addIframe('upload_dialog', 'Image Uploader','path/to/ckeditor/plugins/uploader/dialogs/upload.html',550,400,function(){/*oniframeload*/})
var cmd = a.addCommand('uploader', {exec:uploader_onclick})
cmd.modes={wysiwyg:1,source:1}
cmd.canUndo=false
a.ui.addButton('uploader',{ label:'Upload an Image..', command:'uploader', icon:this.path+'images/icon.png' })
}
})
function uploader_onclick(e)
{
// run when custom button is clicked
CKEDITOR.instances.editor1.openDialog('upload_dialog')
}
I guess some explanation is required for this…
There is a plugin called ‘iframedialog’ which does all the difficult(!) work in registering a dialog. We need to reference it to be able to use it (hence the requires:['iframedialog']).
“CKEDITOR.dialog.addIframe” registers an iframe using the plugin ‘iframedialog’ take a the following parameters:
Once you have registered the iframe dialog, you can add a new command which calls a function (uploader_onclick) which then opens the registered iframe. Simple really!!
The only thing you need to do now is to instruct CKEditor to load the plugin.js file from your folder. To do that open the file “ckeditor.js” and do a search for the phrase ‘about,
This should take you to the part of the script which lists all the plugins. Add your plugin name to this comma-separated list and tryout your new plugin!

Many thanks to Lee for extending my tutorial to handle to OK button (something a lot of you have been asking about).
Add the following to the page in the iframe…
var CKEDITOR = window.parent.CKEDITOR;
var okListener = function(ev) {
this._.editor.insertHtml('<p>Text Here</p>');
CKEDITOR.dialog.getCurrent().removeListener("ok", okListener);
};
CKEDITOR.dialog.getCurrent().on("ok", okListener);
This is more of a personal note, as I only use this occasionally and is not one of those things I generally remember. (may be my head is too full of vim shortcuts to remember this..?)
The following command returns the date in year-month-day format, which is perfect for time-stamping files.
date +%Y%m%d
So say for example you were tar-ing a directory up as part of an automated backup routine. To time stamp the tar file would probably look something like this:
tar cvvf backup-`date +%y%m%d`.tar /path/of/target/directoryLeave the first comment ▶