Protected: Ticking Watches

Posted in Miscellaneous at 4:33 pm by

This post is password protected. To view it please enter your password below:


Max packet size

Posted in Miscellaneous, windows at 2:04 pm by

When you send a large amount of data over the internet that data is being split up into smaller packets and is reassembled on the receiver side. The maximum size of such an individual packet is called Maximum Transmission Unit (MTU), and refers to the size (in bytes) of the largest packet or frame that a given layer of a communications protocol can pass onwards.

If somewhere on your network a MTU value is changed this can cause havoc for your communications. You could end up with a dead vpn tunnel. A quick way to determine what the largest packet is you can send to an ip is to use ping.

PING google.be -f -l 1472

-f Set Don’t Fragment flag in packet.
-l size Send buffer size.

When you packet size is to big you will get:

Packet needs to be fragmented but DF set.

When the packet size is not to big, it will just ping.

Once you know what the MTU should be you can config this on the application/protocol which is having issues.


GIT Version system tutorial

Posted in Debian, Linux, Miscellaneous, windows at 3:53 pm by

GIT Version system

Git is a distributed file versioning system. It was initially created by Linus Torvalds. Linus is better known for the creation of linux.

This is some quick guide on getting started with GIT for people with a windows desktop and a linux server.

Download the windows GUI version of git from http://code.google.com/p/msysgit/downloads/list

Install it.

To create a new repository, only needed if you are starting a new project. If you are going to contribute to a existing project skip to the next section

Open a command line. navigate to the place where you want to start a new repository. Create a new directory for the repo.

md init_repo
cd init_repo
git init
cd ..

git clone –bare init_repo repo.git

Now upload the repo.git directory to your webserver. I do this with winscp, but you can use whatever way you like.

SSH into your server. Install git

apt-get install git-core

To get a existing git repo.

Open a command line.
Navigate to the directory where you want to have the repo.

git clone ssh://username@host.com/path_to_git_repo

I’m using ssh instead of the daemon as I don’t really see an option to password protect the repo.


Recursively removing .svn directories

Posted in Linux, Miscellaneous at 12:13 pm by

Use this command
find . -name .svn -print0 | xargs -0 rm -rf
You could also use “svn export”…


Time synchronizing in windows

Posted in Miscellaneous, windows at 4:28 pm by

You can check the current time on your domain by typing in the following

net time

This gives me: Current time at \\s-dc1.mydomain.local is 3/31/2008 1:56 PM

To setup Time synchroniziation type in:

>net time /SETSNTP:\\s-dc1.mydomain.local

s-dc1.mydomain.local Local should be replaced with the servername where your time service is running. Now to check check what time server your pc uses type:

net time /QUERYSNTP


ASP_0131 Disallowed_Parent_Path

Posted in Miscellaneous, windows at 3:38 pm by

IIS 6 has by default parent paths disallowed. These settings are required to use relative paths in virtual includes.

Parent paths allow you to use ‘..’ when browsing directories and MapPaths etc enabling files in the parent directory to be used.

To enable parent paths:

• Start the Internet Services Manager (Start – Programs – Administrative Tools – Internet Services Manager)
• Right click on the web site and select properties
• Select the ‘Home Directory’ tab
• Click the ‘Configuration’ button under the Application Settings
• Select the ‘App Options’ tab
• Check the ‘Enable parent paths’ box and click Apply

You don’t need to restart the service for the change to take effect.


Fix for iTunes 5002 Error

Posted in Miscellaneous at 4:11 pm by

Since upgrading to iTunes 7.3, I got the following error when searching iTunes Store for songs: “We could not complete your Music Store request. An unknown error occurred (5002).”

This problem is related to the iTunes shopping cart. To fix, go to edit/preferences/store, activate one-click shopping and press OK. The problem should now be fixed. If you want, you may also now re-enable the shopping cart.


Protected: Lotus notes Read mail

Posted in Miscellaneous at 2:52 pm by

This post is password protected. To view it please enter your password below:


Vi: Search and Replace

Posted in Linux, Miscellaneous at 9:58 pm by

Search (Wraped around at end of file):

Search STRING forward :   / STRING.
Search STRING backward:   ? STRING.

Repeat search:   n
Repeat search in opposite direction:  N  (SHIFT-n)

Replace: Same as with sed, Replace OLD with NEW:

First occurrence on current line:      :s/OLD/NEW

Globally (all) on current line:        :s/OLD/NEW/g

Between two lines #,#:                 :#,#s/OLD/NEW/g

Every occurrence in file:              :%s/OLD/NEW/g


Posted in Linux, Miscellaneous at 11:14 pm by

Getting awstats running with geoip


To start you‘ll need to install GeoIP C API. Download it :

wget http://www.maxmind.com/download/geoip/api/c/GeoIP.tar.gz 
Next thing is unzipping it and placing the directory where you want it.
I use midnight commander for this so just fire it up and copy it.
Starting midnight commander:
Go into the directory you just created by unzipping.
Do the following commands:
make check
make install
The GeoIP C API has been installed. Next we install the IP Perl Module.
When this fails and you are on a linux distro(debian taste) you might want to run:
apt-get update
apt-get upgrade
apt-get install gcc
apt-get install make
apt-get install texinfo
apt-get install libc6
apt-get install zlib1g-dev

GeoIP Perl API

Download Geo::IP Perl Module, use the command below but recplace THE_LAST_VERSION with the right tar.gz file

wget http://www.maxmind.com/download/geoip/api/perl/THE_LAST_VERSION

Next thing is unzipping it and placing the directory where you want it.
Go into the directory you just created by unzipping.

Now do the following commands. (if you have a problem with the make test see for instruction after the commands)

perl Makefile.PL
make test
make install

Only if you had problems

If you get a "libGeoIP.so.1: cannot open shared object No such file or
directory" error, add /usr/local/lib to /etc/ld.so.conf then run
/sbin/ldconfig /etc/ld.so.conf     


Now you need to go to the config file of your website and alter the Plugin: GeoIP part.

Change /pathto/GeoIP.dat to where this database acctually is. You can quicly find it by

Doing a locate. Well quickly you’ll have to do a locate –u first of course which will take some time.

locate –u

locate GeoIP.dat

On my system it returns:


Now I replace # LoadPlugin="geoip GEOIP_STANDARD /pathto/GeoIP.dat"


LoadPlugin=”geoip GEOIP_STANDARD /usr/local/share/GeoIP/GeoIP.dat”

This is the section where to do it

# Plugin: GeoIP

# Perl modules required: Geo::IP or Geo::IP::PurePerl (from Maxmind)

# Country chart is built from an Internet IP-Country database.

# This plugin is useless for intranet only log files.

# Note: You must choose between using this plugin (need Perl Geo::IP module

# from Maxmind, database more up to date) or the GeoIPfree plugin (need

# Perl Geo::IPfree module, database less up to date).

# This plugin reduces AWStats speed of 8% !


#LoadPlugin="geoip GEOIP_STANDARD /pathto/GeoIP.dat"
Also make sure that DNSLookup look up is turned off.

Congratulations you have now a awstats with a working geoip module.

« Previous entries Next Page » Next Page »