PHP: Doing some cool things with references and destructors

php-logo
Not everybody of you might know, that there are references in PHP too, like in many other languages. I wondered if there is something these references might be really good for and came up with the following concept.

|Den ganzen Beitrag lesen...

Ubuntu: Create own or fix broken samba shared directorys

ubuntu_logoI recently wanted to create a shared folder with the attribute hidden, but did not want to change the /etc/samba/smb.cnf.

So i searched where the shares created by the gnome folder-properties window where saved. The directory is:

/var/lib/samba/usershares/

This is also the place, where you might fix a broken share by deleting the config file.

Kubuntu: Connect to hidden WLAN

kubuntu_logo
Somehow the Network-Manager in Kubuntu can not connect to hidden wireless lan. But i found a simple workaround in the kubuntuforums.net:


|Den ganzen Beitrag lesen...

Linux: Count lines of code

linux-logo
I found a cool programm, that can count lines of code for several programming languages.
You can find it here: http://cloc.sourceforge.net/


|Den ganzen Beitrag lesen...

Whiz: Simple cURL PHP wrapper class

I worked on a project where i needed to handle a lot with cURL request. At first i tried to use Zend_Http_Client, but it was too limited for my purpose. So i wrote my own cURL handler php class.

|Den ganzen Beitrag lesen...

Ubuntu: Backup/Copy network settings in Ubuntu

ubuntu_logoI did a clean install of Ubuntu 11.04 and copied all the needed configs from my old 10.10 installation. But i could not find the needed folders for the network and wireless settings, so i searched for them and this is what i found.

|Den ganzen Beitrag lesen...

Linux: Slow dd because of default blocksize

linux-logoToday is backed up my SSD so i can install Ubuntu 11.04 fearlessly.
Problem was that dd was very slow, but i found a solution.

|Den ganzen Beitrag lesen...

Ubuntu: Install on a Disk with less than 4.4 GB (Workaround)

ubuntu_logoI tried to install Ubuntu 11.04 on a 4 GB USB-Stick today, but was failed by the installer who wants at least 4.4 GB free space. This is unnecessary much, because a normal Ubuntu install will stay below 2.5 GB.
I found a "fix" that works like this:

|Den ganzen Beitrag lesen...

Linux: Change timezone on Debian/Ubuntu

Change timezone on your Ubuntu/Debian system by opening a Terminal and run this command:

sudo dpkg-reconfigure tzdata

Bash: Simple HDD/SSD speed test using dd

terminal-icon-100x100
I wrote a (very) short script to test hdd or ssd speed using dd. You can find the code here:

hdd-speed-test-1gb.sh
and as text:
hdd-speed-test-1gb.sh.txt

The script uses dd and /dev/zero for writing a 1GB sized tempfile. Then the tempfile is written by dd to /dev/null. dd produces some output where the transfer speed is mentioned. Afterwards the tempfile is removed.
It is really just a tiny script, so i do not have to remember the dd syntax every few months.