sham's blog

iperf - tool for testing network transfer speeds

http://iperf.sourceforge.net/

iperf is a tool for testing network transfer speeds. From its sourceforge page:

'Iperf was developed by NLANR/DAST as a modern alternative for measuring maximum TCP and UDP bandwidth performance. Iperf allows the tuning of various parameters and UDP characteristics. Iperf reports bandwidth, delay jitter, datagram loss.'

Quick start:

iperf -s on server
iperf -c hostname (or ip of server) on client. Use -f to change the format.

CLI Tip: Quickly create backup of file

Quick tip to rename a file:
cp /etc/X11/xorg.conf{,.bak}
will create a copy of xorg.conf as xorg.conf.bak in /etc/X11

Archlinux x64 Flash directory permissions problem

I have just moved to Archlinux - mainly due to its rolling release policy and because (for me) the last 2 Ubuntu releases have been awful.
To be fair I had the same Xinerama + Qt + Xorg 1.9 = Crash problem on Archlinux as well but anyway...

Another issue I had was after installing flashplugin-prerelease using:

yaourt -S flashplugin-prerelease

I got this warning:

warning: directory permissions differ on usr/lib/mozilla/
filesystem: 700 package: 755

And firefox did not detect the plugin (about:plugins was empty)

Drupavim

I have been looking for a nice and quick blogging program to link with this website (running Drupal).

I might have found one: Drupavim is a plugin for vim that allows you to write blog posts in vim!

See here: http://reluctanthacker.rollett.org/software/drupavim

And module for inline tags: http://drupal.org/project/inlinetags

Vim - Autoindent/format code

I had a php file where the indentation had been completely messed up. A quick google came up with this tip for vim:

Press: gg=G
to select the all lines and autoformat.

ExtJs Direct - Not enough required params or this.form is undefined

{"type":"exception","tid":4,"message":"Not enough required params specified for method: loadForm  on class ClassNameHere"
}

If you are getting errors like this check firebug to make sure you are sending the data. I was not sending the data because I keep forgetting to set 'paramorder' or 'paramsasHash' on the form config.

High X server cpu usage on Ubuntu 10.10?

I was having very slow firefox scrolling and terminal text- I fixed it by updating to 260.19.21 from https://launchpad.net/~ubuntu-x-swat/+archive/x-updates

System: Ubuntu 10.10 x64 with 3 monitors on 2 Nvidia cards using Xinerama

Official Spotify for Linux Native Client with Offline track support

I have been having problems with Spotify under wine on Ubuntu 10.10. A bit of googling revealed that Spotify now have a preview of a native client for Linux!

http://www.spotify.com/uk/download/previews/

Just installed it and it seems to be working well.

CakePHP - The requested address ... was not found on the server

I just installed the new Ubuntu 10.10 on my workstation. I am in the progress to upgrading to CakePHP 1.3 but more on that later. The first problem I had (that I always have because I always forget this):
The requested address .. was not found on the server

Solution? Enable mod_rewrite. On Ubuntu I did
sudo a2enmod rewrite

Linux/Ubuntu: Changing your default shell

Use the command:
chsh -s /path/to/shell yourusername

So to switch to zsh use
chsh -s /bin/zsh yourusername
Syndicate content