Random letters with PHP

Tags:

Since it was no already function for random letters in PHP i was google on it and found this one some where i do not remeber but works exemplary.

function randomletters() {
$chars = “abcdefghijkmnopqrstuvwxyz023456789″;
srand((double)microtime()*1000000);
$i = 0;
$pass = ” ;
while ($i <= 7) {
$num = rand() % 33;
$tmp = substr($chars, $num, 1);
$pass = $pass . $tmp;
$i++;
}
return $pass;
}

If you know who made this one please tell me and i will link to the page in this post :)

For random numbers please take a look at rand.


OneSwarm

Tags:

Today was the first day I ever heard of the new sharing client that have already got great success. Since a lot of new laws have make it hard to legally download copyright products it have also come a lot of new ways how to get around thoose problem and OneSwarm is one of them. OneSwarm makes a new network, based on your friends and your sharing. One problem already found is that you do not know what kind of people that your friends invite, if wrong person access to your network it may cause some problems.

OneSwarm official homepage: http://oneswarm.cs.washington.edu

To be continued…


Center div with CSS

Tags: ,

Simple example how to center a div with css.

Open your CSS file and write:

body { text-align: center; }

.centerdiv {
margin: 0 auto;
width: 200px;
text-align: left;
}

Now open your index or what ever you want to put your div and create it:

<div class="centerdiv">text</div>


Spotify on Ubuntu

Since I am a Spotify user I just had to have it on my Ubuntu desktop. After few seconds of google i find it very easy to install Spotify on Ubuntu. You can follow thier official how to on their home page:

http://www.spotify.com/en/help/faq/wine/


PNG-fix for IE6

Tags:

Here is a very good png-fix for IE6. Still it do not work on Ubuntu if you have IE6 installed on your Ubuntu.

http://labs.unitinteractive.com/unitpngfix.php


Debian 5 Released

After 2 years since Debian 4 the new Debain 5 finally came. Acutely I am not a Debian user but since Ubuntu is build on Debian i find it necessary to write about this new on my blog.

You may find more information about the new version on thier home page:

http://www.debian.org/News/2009/20090214


Internet Explorer 6 on Ubuntu

This howto will learn how to install Internet Explorer 6 on Ubuntu.

Update apt-get:

sudo apt-get update

Install Wine and Cabextract:

sudo apt-get install wine cabextract

If any questions appear select yes.

Now, install IEs4Linux (NOT as root!):

cd ~
wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
tar zxvf ies4linux-latest.tar.gz
cd ies4linux-*
./ies4linux

Select the explorer versions you want to install and select desktop if you want a shortcut on your desktop.


Footer position bottom with css

Tags:

After some hours i finally found this tutorial how to make a footer stick to bottom with css. I put it here if someone of you ever need.

http://ryanfait.com/resources/footer-stick-to-bottom-of-page/

Many thanks to ryanfait.com!


Firefox

This will be my first review and I will write my opinion about Firefox version 3.

firefox

Short information about Firefox

Firefox 1.0 was released in November 2004 by the creators of Mozilla. Firefox is as many other web browsers free to download and use. It have Open Source and does work to operative systems like Linux, Mac and Windows. Today the version 3 is out and is a very popular web browser. The goal with version 3 were to be the most downloaded software in 24 hours, the result became over eight million downloads.

My own opinion

I did my first download of Firefox for more then a year ago. Before i did download Firefox I was a true Internet Explorer user most because of their FTP client, that they did remove in Internet Explorer 7 -_- Any way, my first impression of Firefox was good. That i did like most of it was their tag system which i never seen before. But what i did not like was their FTP client which for me is worth nothing. An other good thing about Firefox was that i never seen one more “can not respond” error… But the happines wouldent stay for long. In the newer version of Firefox they have a new problem with closing down the browser. If you shut it down and will start it again you will with big possibility get the error “Firefox is already running”. The only good thing about this is that the error is only comes on Windows, atleast for me, but since I am half Windows user i really do not like this error. Any way, since it fast and works on Linux is it the best web borwser that i have used so far.

Score:

8/10 – Good score, still it can be better!


Common Ubuntu Commands

Tags:

Here comes a list with some commands I often use on Ubuntu. I will update this list when I get more time, so do not expect a new post with new commands, it will appear here!

Window with root access

gksudo nautilus

Copy hole disk to another

sudo dd if=/dev/disk-you-will-copy of=/dev/disk-you-will-copy-too

Format disk

sudo mkfs.Filesystem /dev/you-disk

Install program

sudo apt-get install Program

Remove program

sudo apt-get remove Program

Show IP address

ip route

Ping IP/Hostname

ping Hostname