encrypt your pendrive
Thursday, 13. September 2007 7:33 - daniel - Linux - 0 Comments
encfs is a module for encrypted filesystems in userspace. It doesn't require special permissions and uses the fuse library. And it doesn't use one big encrypted file that spams your regular file system.
I found a little script to manage the mounting and unmounting of the drive. Just put it in the root folder of your pendrive.
Create a folder named .encrypted on the pendrive and a folder named USB in your home dir. Change the ENCDIR and MNTDIR variables to match your setup.
#!/bin/sh
###############################
# Config start
###############################
# The directory on the stick
ENCDIR=".encrypted"
# Where to mount
MNTDIR="/home/daniel/USB"
###############################
# Config ends here
###############################
usage(){
echo basename $0" [m|mount|u|unmount]"
echo " either mounts or unmounts encrypted file system"
}
if [ -z $1 ]; then
usage
exit
fi
case "$1" in
"m" | "mount" )
while ! /usr/bin/encfs $( dirname $0 )"/$ENCDIR" "$MNTDIR"; do
echo -n "Retry "
done;
if [ "$?" -eq "0" ]; then
echo "Encrypted filesystem now mounted"
exit 0
fi
exit 1
;;
"u" | "unmount" )
if /usr/bin/fusermount -u "$MNTDIR"; then
echo "Encrypted filesystem has been unmounted"
exit 0
else
echo "Unmounting failde"
exit 1
fi
;;
* )
usage
;;
esac
Headgirl
Saturday, 8. September 2007 14:27 - daniel - Other - 0 Comments
Motörhead and Girlschool preforming Please don't touch in (I guess) 1981. (RIP Kelly Johnson 20. June 1958 - 15 July 2007)
Video after the jump.
Wordpress and permalinks without mod_rewrite
Thursday, 6. September 2007 22:21 - daniel - Blogs - 2 Comments
Even if your webhost doesn't let you use mod_rewrite, you can get nice URL with a simple hack. Mosty webhosts let you configure custom error pages. That means, if a visitors tries to access a page that doesn't exist, you can show him your special 404 page instead of the apache default.
We will use this for our permalinks. If you enable permalinks and mod_rewrite doesn't work, all you'll see is a 404 page. We'll now create custom error handlers for 404 to display index.php instead. Every time a visitor opens a permalink, he will trigger this custom error handler and he'll see the correct site. Wordpress doesn't care, if mod_rewrite or our custom error handler has redirected this user.
All you need to do is this:
Switch Wordpress to your preferred permalink structure.
Either write this into your .htaccess file (and delete everything that was in there):
ErrorDocument 404 /index.php
ErrorDocument 403 /index.php
ErrorDocument 401 /index.php
or, if you have a management panel like confixx or syscp, you can configure error documents there:
You should add this to your index.php file, right after the <?php in a new line
header( 'HTTP/1.1 200 OK' );
Wow Armory search plug-in for Firefox and IE7
Thursday, 6. September 2007 15:51 - daniel - World of Warcraft - 0 Comments
This is a search plug-in for the WoW Armory. It's based on the OpenSearch Specifications, therefore it should work with Firefox and Internet Explorer 7. This plug-in works with the latest version of the Armory.
Click here to install the plugin for the North American Realms
Click here to install the plugin for the European Realms
Trafficlogger
Sunday, 2. September 2007 10:11 - daniel - Linux - 2 Comments
Trafficlogger for a linux system. The code is a mess and the database takes a lot of space after some time, but I like the result. Would anyone be interested in this script?