Find/Replace text in multiple files with sed

October 13, 2011 1 comment

sed -i ‘s/old-word/new-word/g’ *.txt

Just replace old-word, new-word, and *.txt with your particulars.

Categories: DIY

Quickly restart scalix smtp relay

April 20, 2011 Leave a comment

/etc/init.d/sendmail restart

omoff -d 0 smtpd

omon smtpd

Categories: scalix

Resample mp3 file with lame for trixbox pro

March 8, 2011 Leave a comment

For ubuntu/debian distributions.

You will end up with NewFileName.mp3, optimized for trixbox pro music on hold.

sudo apt-get install lame

lame -V5 -b 128 –resample 44.1 OriginalFileName.mp3 NewFileName.mp3

Categories: linux, trixbox pro

Adding a non-detected modeline in ubuntu as default

December 16, 2010 Leave a comment

I adapted the procedure I found here to make my old Samsung Syncmaster 192N work at its native resolution. It is running through an old projector on the ceiling, which I’m sure is what is breaking the autodetection.

cvt 1280 1024 75

That returned: # 1280×1024 74.90 Hz (CVT 1.31M4) hsync: 80.30 kHz; pclk: 138.75 MHz
Modeline “1280x1024_75.00”  138.75  1280 1368 1504 1728  1024 1027 1034 1072 -hsync +vsync

Added these lines to /etc/gdm/Init/Default:

xrandr –newmode “1280x1024_75.00”  138.75  1280 1368 1504 1728  1024 1027 1034 1072 -hsync +vsync

xrandr –addmode VGA-0 1280x1024_75.00

xrandr –output VGA-0 –mode 1280x1024_75.00

Now it starts out at the correct resolution at startup, regardless of the state of the projector.

Categories: DIY, linux, ubuntu

Restart Scalix webmail service quickly

November 22, 2010 Leave a comment

All you need to do is touch the web.xml file.

Our example:

touch /var/opt/scalix/sx/tomcat/webapps/webmai/WEB-INF.web.xml

From Scalix wiki

Categories: scalix

Install ESXi VMWare tools on Ubuntu Server Edition

November 18, 2010 Leave a comment
  1. sudo su
  2. apt-get update
  3. apt-get upgrade
  4. apt-get install build-essential binutils linux-headers-`uname -r`
  5. mount /dev/scd0 /cdrom
  6. cp -a /cdrom/VMwareTools* /tmp/
  7. cd /tmp/
  8. tar -vxzf VMwareTools*.gz
  9. cd vmware-tools-distrib/
  10. ./

All the defaults are fine.

Categories: linux, ubuntu, VMWare

Windows XP Activation Loop

August 30, 2010 Leave a comment

Windows XP can get stuck in a loop where it wants to be activated, then when you proceed it says it is already activated and logs you out. Here is a safe mode fix from Microsoft that worked today:

Categories: Windows