Feed on Posts or Comments

Linux Adam Deacon on 07 Nov 2008

Testing mail servers

Back in the good ol’ days of POP3 it was really easy to test a mail server manually you just simply telnet to port 110 issue some 3 command and done! Now that all ISPs support IMAP things are a little more complicated. Here’s my little guide to manually testing POP3, IMAP and SMTP

Continue Reading »

mplayer Adam Deacon on 06 Aug 2008

More mplayer fun!

This week I have been playing with youtube videos to either extract the sound from the video and converting to MP3 or converting the whole video to mpeg.

I’ve used the same kind of process to convert RealAudio streams to MP3. Firstly download the youtube video. I use the DownloadHelper addon for firefox. It’s really easy to use, you just search for your favourite video then click the button in the toolbar.

Once you’ve got your flv, you should be able to play that through totem/mplayer. If not, you’ll need install the correct gstreamer plugins. If you’re using Fedora, I’d suggest taking a look at MyGuide

OK, let’s say we want to rip the sound out of the file.. Really useful if you want a obsecure song that you can only find on youtube. It’s a two stage process, rip it as a wav then encode it to mp3.

mplayer Pork_and_Beans.flv -ao pcm:file=file.wav -vc dummy -vo null
lame -V Pork_and_Beans.mp3 file.wav --tt "Pork and Beans --ta "Weezer"
rm file.wav

That’s all there is to it!

OK next trick is to convert the flv to a Mpeg. This is slightly tricker and I haven’t had great results playing these on Windows (timing are all screwy)

mencoder Pork_and_Beans.flv -oac lavc -ovc lavc -lavcopts vcodec=msmpeg4v2:acodec=libmp3lame:abitrate=64 -o Pork_and_Beans.avi 2>/dev/null

The /dev/null is to drop the millions of warning messages you get about clipping.

Code Adam Deacon on 06 Aug 2008

Wordpress style permalinks

Recently I was writing a database driven website, where all the content was within a database and the only real page was index.php.

This is easy enough to do, but of course, you need to tell index.php which page you want so you end up with URL like http://www.deaconsworld.org.uk/index.php?PageID=12 or  http://www.deaconsworld.org.uk/index.php?PageID=36. Not the most user or SEO friendly. What I really wanted was URL that looked like this:  http://www.deaconsworld.org.uk/contact/ or http://www.deaconsworld.org.uk/about/

Continue Reading »

Linux Adam Deacon on 01 Jul 2008

Getting BIOS information

I recently needed to get a load of Dell service tags from some remote servers. Dell very nicely provide a ActiveX component for Windows but nothing for Linux. Fortunately we can use dmidecode. Run it as root and it will output loads of hardware info. If you looking for something specific, then you can run it with -s option and provide a keyword such as:

  • bios-vendor
  • bios-version
  • bios-release-date
  • system-manufacturer
  • system-product-name
  • system-version
  • system-serial-number
  • system-uuid
  • baseboard-manufacturer
  • baseboard-product-name
  • baseboard-version
  • baseboard-serial-number
  • baseboard-asset-tag
  • chassis-manufacturer
  • chassis-type
  • chassis-version
  • chassis-serial-number
  • chassis-asset-tag
  • processor-family
  • processor-manufacturer
  • processor-version
  • processor-frequency

Here’s the output of it:

[root@ajd-laptop ~]# dmidecode -s bios-vendor
Dell Inc.
[root@ajd-laptop ~]# dmidecode -s processor-manufacturer
Intel
[root@ajd-laptop ~]# dmidecode -s processor-frequency
1600 MHz
[root@ajd-laptop ~]# dmidecode -s chassis-type
Portable

Deaconsworld Adam Deacon on 25 Jan 2008

The world’s most neglected blog

I’m planning on entering this blog for “The World’s most neglected blog” Award. I think I’ve got a pretty good chance. My acceptance speech will include the following excuses:

  • I was too busy (True, more to come on that later)
  • Nothing exciting has happened to be recently (Not true - More to come on that soon)
  • I haven’t got anything useful to say (Always true, but it’s never stopped me before!)

Next Page »