• Happy Coding

Archive for the ‘manual of the day...’ Category

Create AuthUserFile

htpasswd -c .htpasswd USERNAME

How to change a normal Eclipse project to a Java Eclipse project

I just had the problem that i wanted to change the project-type of an Eclipse project to ‘Java Project’ — it was a normal project before. This are the steps i executed:

  1. Close the project
  2. Go to the project directory  (e.g. using Terminal application)
  3. Open .project file
  4. Go to the XML node <natures> and insert <nature>org.eclipse.jdt.core.javanature</nature> as a child.
  5. Save the file
  6. Re-Open the project

That’s it.

Reblog this post [with Zemanta]

Recovering a deleted file in Subversion

svn up -r 3838 myfile.test

In this case 3838 is the number of the revision in which the file existed.

manual of the day… Uninstalling Xcode

Uninstalling Xcode

Just wanted to uninstall Xcode and i remembered that it was always a Perl script in /Developer/Tools, but this time i didn’t find it there. So a little search revealed that it is now in /Developer/Library. To execute it, just call it in Root-Mode using:

sudo /Developer/Library/uninstall-devtools --mode=all

manual of the day… change hostname on Debian

Change hostname on Debian

I wanted to change the hostname on my Debian Etch installation. The following worked:

sudo vi /etc/hostname

Change the hostname and save file and then

sudo /etc/init.d/hostname.sh start

manual of the day… install Erlang and Mochiweb under Ubuntu

install Erlang and Mochiweb under Ubuntu

First of all we install necessary components and start with the Erlang installation:

sudo apt-get build-dep erlang
sudo apt-get install java-gcj-compat java-gcj-compat-dev

Then we download the source of Erlang (newest versions are available here: http://erlang.org/download.html). I took the R12B-5 release.

wget http://erlang.org/download/otp_src_R12B-5.tar.gz

Extract

tar xfvz otp_src_R12B-5.tar.gz

Configure (choose your favorite directory for the Erlang installation, here: /usr/local/erlang), build and install it:

cd otp_src_R12B-5
./configure --prefix=/usr/local/erlang
sudo make
sudo make install

Now the Mochiweb part

We checkout the newest Mochiweb source using subversion (if not installed yet. Install subversion using sudo apt-get install subversion).

svn checkout http://mochiweb.googlecode.com/svn/trunk/ mochiweb
cd mochiweb
sudo make

manual of the day… Use soundex strings with Ruby

Use Soundex strings with Ruby

To create soundex strings in Ruby which you can then use for example in MySQL queries (see MySQL manual) can be easily created using the Text library (http://rubyforge.org/projects/text).

Install it using gem:

sudo gem install Text

Include it using…

require 'text'

…and use it for example in this way:

Text::Soundex.soundex('Hello world')

manual of the day… Install Sun Java under Ubuntu Linux

Install Sun Java under Ubuntu Linux

After i had problems with the normal Java Debian-Package i decided to install Java by myself.

Read the rest of this entry »

manual of the day… Install Munin on Debian and running it under Apache

Install Munin on Debian and running it under Apache

Munin is a great tool, which generates graphs and shows you the server’s memory usage, number of MySQL queries and a lot of other information (see http://munin.projects.linpro.no/).
This short tutorial shows the steps for installing Munin on a Debian server.

Read the rest of this entry »

manual of the day… Install PHP5, Apache2 on Mac OS X

Install PHP5, Apache2 on Mac OS X

Install Apache in /usr/local/apache2

$ curl http://apache.linux-mirror.org/httpd/httpd-2.2.4.tar.gz -O

$ tar xvfz httpd-2.2.4.tar.gz

$ cd httpd-2.2.4

# ./configure --prefix=/usr/local/apache2/ --enable-module=most --enable-shared=max

# make

# make install

Install PHP in /usr/local/apache2/php
(Assumption: MySQL in /usr/local/mysql)

Read the rest of this entry »