Posts Tagged ‘config’

People stealing my bandwidth (and no credit to me!)

Saturday, February 19th, 2005

I was looking through my web logs recently and found a number of people were displaying my images
on their websites. Sure it is a bit flattering that someone liked my photo of our rug was perfect for the background of their blog or thought that embedding a 1M photo I took of John Kerry and Howard Dean in a high traffic web forums [1 | 2] was a good idea. However they sucked up nearly 200M of my monthly bandwidth quota and didn’t even give me credit for the photos. You know, I think that may be the worst part.

So this evening I googled around for the magic Apache configuration commands that would prevent
JPG/GIF images from being embedded in someone else’s web page. (ie: one not hosted on
nozell.com)

For the record, just pop this in a file named “.htaccess” in the same directory as were the images
are located and it will refuse to let GIF/JPG images to be loaded from other sites.

SetEnvIfNoCase Referer "^http://.*nozell.com/" local_ref=1

<filesmatch ".(gif|jpg)">

Order Allow,Deny

Allow from env=local_ref

</filesmatch>

Read Ken Coar’s Preventing Image ‘Theft’ tutorial for complete details.

Getting the bleeding edge iPodder on Linux (debian/sarge) mini-HOWTO

Tuesday, January 4th, 2005

Lately, I’ve been using the bleeding edge version of iPodder from CVS (which confusingly is in the
iSpider directory) Here is how you can grab a copy for yourself:

$ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ipodder login
CVS password: (press return)

$ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ipodder co iSpider

[tons of informational messages about downloading iSpider]

$ cd iSpider
$ export PYTHONPATH=/usr/lib/python2.3/site-packages/wx-2.5.3-gtk2-unicode:$PYTHONPATH-unicode:$PYTHONPATH
$ python iPodderGui.pyw

… And fire up your favorite dev tools!

iPodder GUI on Linux (debian/sarge) mini-HOWTO

Tuesday, January 4th, 2005

I’ve been using the ipodder beta on
my laptop that runs GNU/Linux Debian/Sarge in the command line only mode. But over the holidays there was and update to wxpython that gets the GUI working.

This is what you need to do:

$ alien –to-deb ipodder-1.1.2-1cl.noarch.rpm
$ sudo dpkg -i ipodder_1.1.2-2_all.deb
$ export PYTHONPATH=/usr/lib/python2.3/site-packages/wx-2.5.3-gtk2-unicode:$PYTHONPATH-unicode:$PYTHONPATH
$ /opt/iPodder/iPodderGui.py

and enjoy…

festival speech synthesis on my debian laptop

Wednesday, August 25th, 2004

Last night I was mucking around with festival, the text to speech tool (ala the old DECtalk. On my [laptop](http://h10010.www1.hp.com/wwpc/us/en/sm/WF05a/321957-64295-89315-321838-f33-367367.html) it was speaking too fast.

The solution is found in the Festival FAQ: Running Festival

Create the file festival/lib/siteinit.scm (if you don’t already have it) and add the following

(Parameter.set 'Audio_Method 'Audio_Command)

(Parameter.set 'Audio_Command "sox -t raw -sw -r $SR $FILE -c2 -t ossdsp /dev/dsp")

On debian, you put those two lines in /etc/festival.scm

Configuring Red Hat Enterprise Linux for Dynamic DNS

Tuesday, June 15th, 2004

Out of the box, when Red Hat Enterprise Linux requests a DHCP address, it doesn’t send up a hostname for a dynamic DNS server to use.

It is simple, but seemingly different on each distribution. But for Red Hat Enterprise Linux, create a file /etc/dhclient-eth0.conf (or /etc/dhclient-eth1.conf for eth1, etc) and put this in it:


send host-name "yourhostname";

Of course, you can put other options for dhclient in there too.

If you poke around in /etc/sysconfig/network-scripts/ifup you’ll see how it is used.

Looking for how to do this for Debian/Sarge? Look here

Configuring Debian/Sarge for Dynamic DNS

Tuesday, June 15th, 2004

Out of the box, when debian/sarge requests a DHCP address, it doesn’t send up a hostname for a dynamic DNS server to use.

It is simple, but seemingly different on each distribution. But for debian/sarge, create a file /etc/dhclient.conf and put this in it:


send host-name "yourhostname";

Of course, you can put other options for dhclient in there too.

Looking for how to do this for Red Hat Enterprise Linux? Look here

Create a new ssl certificate for imapd (imapd.pem) on debian

Sunday, June 15th, 2003

It has been a year of using imaps and the certificate expired.

On the imap server, do this:


# cd /etc/ssl/certs/
# openssl req -new -x509 -nodes -out imapd.pem -keyout imapd.pem -days 365
Generating a 1024 bit RSA private key
..........++++++
.....................................++++++
writing new private key to 'imapd.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:New Hampshire
Locality Name (eg, city) []:Merrimack
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Wildcat Learning
Solutions
Organizational Unit Name (eg, section) []:Home Server
Common Name (eg, YOUR name) []:Marc Nozell
Email Address []:marc@nozell.com
#

Making mutt *not* use mozilla to view html body/attachments

Wednesday, January 29th, 2003

I don’t know why it is non-obvious, but I finally tracked down to how have mutt use a text web browser (lynx|links) to display email with HTML bodies or attachments.

In your ~/.mailcap, put this:

text/html; lynx %s; nametemplate=%s.html

A cryptic reply here pointed to the right part in the Mutt manual