Archive for the 'TipsnTricks' Category

Segmentation Fault with Ubuntu Dapper, OpenSSL and Crypt::SSLeay

Monday, August 14th, 2006

I recently installed Crypt::SSLeay and had a strange result: any script that uses that module would get a Segmentation Fault when it hit a certain point. I found another person complaining about this and the suggestion was downgrading OpenSSL. I did that, and it didn;t work. I upgraded to 0.9.8b and that didnt work.

Finally, I converted the .deb file for openssl to a tarball (using alien) and extracted it into a subdirectory in my personal home dir. I then re-installed Crypt::SSLeay and pointed it to my subdir to link against for OpenSSL. No more seg faults!

CVS over SSH using port OTHER THAN 22

Monday, July 31st, 2006

I got tired of all the little script kiddies banging away at my SSH server 24 hours a day, so I run ssh on a different port than the default of 22. I setup CVS on this server as well, and wanted to check in/out some files remotely but didn’t know how to handle the alternate port issue.

Just like you would do with CVS over SSH on the standard port, you would include this in your ~/.bashrc file:

export CVS_RSH='ssh'
export CVSROOT=':ext:user@server:/path/to/cvsroot'

to get around the alternate port issue, use the ~/.ssh/config file. It’s this simple:

server my.hostname.com
port 12345

Not only does this make CVS work for your remote server, you no longer have to always specify the port number from the command line when SSHing to the server (I wish had known about this months ago)

CLI Magic

Friday, July 28th, 2006

For all of you who love running things from the command line, check out this series of articles on Linux.com:
http://www.linux.com/search.pl?tid=89

ls alias to view ONLY dot files

Friday, July 28th, 2006

alias dot='ls -ldF .[a-zA-Z0-9]*'

i have always wondered if there was a way to view JUST files and dirs that start with a “.”

use OSD (OnScreen Display) to show incoming email Subject line

Thursday, April 21st, 2005

I was thinking I’d like to see the incoming subject lines of my email, not just how many new messages I had. So I wrote a procmail recipe that uses OSD:

:0c
| show_new_mail

and a one liner shell script called ’show_new_mail’ [really just to clean up the procmail recipe]

grep Subject|sed -e's/Subject: /New mail: /g'|DISPLAY=:0  osd_cat -f 9x15 -

Without the “DISPLAY=:0″ part, this fails with the error “Error initializing osd: No display” but only when it’s used as a procmail recipe. It worked fine from the command line.

This requires osd_cat, which is installed with xosd
———————————————————
7/8/2006 EDIT:
Good news for M$ Windows users: there is an xosd package available for Cygwin, so you can do cool OnScreenDisplay things just like linux/XWindows.

Cygwin is a Linux-like environment for Windows. It consists of two parts:

  • A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.
  • A collection of tools, which provide Linux look and feel.

stop Firefox from using up all your RAM

Wednesday, April 20th, 2005

Are you tired of Firefox taking up more and more RAM the longer you leave it running? Do you have to kill and restart it every day or two just to get back some RAM? Well suffer no more. It’s just one easy setting. Go to

about:config

and add this NEW value, of type Integer:

browser.cache.memory.capacity

The value is in KB, so to set it for 16MB, set the value ‘16384′. That should be plenty. By default this value is ‘-1′ which means ‘TAKE EVERYTHING I HAVE, PLEASE!’.

NOTE: This works on EVERY operating system [AFAIK], even sucky winDoze

view MS Streaming video with mplayer

Monday, March 28th, 2005

using the mplayer plugin for netscape/mozilla you can view streaming Micro$oft media that is embedded in a webpage

Also works from the command line, but you will need to know the path to the stream. This not too hard to find:

  1. View the source of the page with the embedded stream and look for something like this:
    <param name="FileName" value="webcam3.asx">
  2. Pull up the .asx file in your web browser; it will be in XML.
  3. Look for an ything starting with “mms://”, and you’ve found your feed url
  4. run
    mplayer <feed url>

For Mac OSX users, there is a port of mplayer available, just for you!

One more thing I can cross of the list of stuff I thought I could only do with M$ WIndoze

Firefox search plugin reorder

Wednesday, March 9th, 2005

Finally! I don’t have to mess with the timestamps on the search plugin files to get them to display in the order I want. I found
some config variables that do it:

browser.search.order.#

where ‘#’ is the order number. “1″ should already be set to “Google”. You can add as many new variables as you like (rt mouse button –> New –>String).

Edit your config variables easily with

about:config

NOTE: You must restart Firefox for the change to take effect


Protect Web Form!

Bad Behavior has blocked 88 access attempts in the last 7 days.