• Home
  • Shell
    • Emacs
    • Perl
    • screen
    • sed
  • Ubuntu
    • VNC
  • Web Development
    • Javascript
    • Joomla
    • MySQL
    • osTicket
  • Windows
    • Gimp

Posts tagged create

Web Dev> PHP created random password

Jul22
2011
Written by Scott Rowley
<?php
// The letter l (lowercase L) and the number 1
// have been removed, as they can be mistaken
// for each other.
function RandomPass() {
// Comment the first line to exclude special characters
$chars = "!@#$%^&*";
$chars .= "abcdefghijkmnopqrstuvwxyz023456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
srand((double)microtime()*1000000);
$i = 1;
$pass = '' ;
// Number of digits we'd like to have our password be
$n = 8;
while ($i < $n) {
$num = rand() % strlen($chars);
$tmp = substr($chars, $num, 1);
$pass = $pass . $tmp;
$i++;
}
return $pass;
}
// Usage
$password = RandomPass();
echo "Random password is: $password";
?>
Posted in Web Development - Tagged dev, development, microtime, password, php, rand, random, return, srand, substr, web, while

Gimp> Gradient text

Oct26
2010
Written by Scott Rowley

Gradient

Select Text Tool
Click and drag inside your image to size your textbox
Enter in the desired text
Select the Select by Color Tool
Make sure Feather Edges is NOT checked
Click on your text (make sure to get the colored portion, not just the box)
Select the Blend Tool
Select the desired Gradient by clicking on the image next to Gradient:
Drag your mouse from one point in your text to another,
the gradient will be applied to the entire area you've selected.

Note: The wider you make it the more color range you will get and the better your gradient will look.

See it all done!

Posted in Gimp - Tagged edit, Gimp, gradient

Corrections? Questions? Comments?

Find an error?
Everything work out great for you?
Have some feedback?
Like to see something added to the article?

PLEASE leave us a comment after the article and let us know how we are doing, or if something needs corrected, improved or clarified.

Thank you!
- The Management

Advertisement

Sudo Bash
By Geeks - For Geeks

Back to Top