Posts Tagged programmierer

Löschen

Auskommentieren ist löschen für Feiglinge!

Tags: , ,

11 reasons to date a female geek

1) She can fix your computer and make a website for your new startup.
2) She has friends who can fix your computer and design a database for you.
3) She can program your mother’s VCR and Tivo your favorite shows.
4) Her friends can program your mother’s VCR and Tivo your favorite shows
5) She can fix your friends’ computers.
6) She’ll make you shine wherever you go — how many of your friends are smart enough to date such a smart and useful woman?
7) She can pick out a the right cell phone/mp3 player/digital camera for you. Even better she can afford to buy it for you.
8) She’ll be so happy that someone appreciates her for her real talents, that she’ll adore you.
9) She won’t cheat either. Given a choice between George Clooney and the newest tech toy, she’ll take the toy.
10) Did I mention that she can fix your computer, make a website, design a database, install your cable modem and WiFi router, setup you iTunes for automatic download of your favorite artists, download your Outlook contacts onto the new cellphone/mp3 player/digital camera that she bought you?
11) And, she can cook dinner while doing all of the above.

Tags: , , , , , , , , ,

Wenn Programmierer vom Feierabend träumen…

< ?php
$fa = new FeierAbend;
$fa->arbeit_abschliessen();
$fa->daten_speichern();
$fa->pc_herunternfahren();
$fa->hole_fahrstuhl('mario');
$fa->wegfahren();
$fa->vollgas();
$fa->feierabend_bier();
?> 

Tags: , , ,

PHP crypt command line

crypt

#!/usr/bin/php
< ?php
require "crypt.php";

$type = $argv['1'];
$string = $argv['2'];
$key = $argv['3'];
if($type !='' &&  $string != '' && $key != ''){
        if($type=="e"){
                echo encrypt($string,$key);
                echo "\n";
        }
        elseif($type=="d")
        {
                echo decrypt($string,$key);
                echo "\n";
        }
        else
        {
                die('WRONG TYPE');
        }
}
else
{
        echo 'crypt TYPE STRING KEY';
        echo "\n\n";
        echo "TYPE:\n";
        echo "e encrypt\n";
        echo "d decrypt\n";
        echo "\n\n";
        echo "STRING Your string\n";
        echo "KEY Crypt key\n\n";
}
?>

crypt.php

< ?php
/**
 * encrypt()
 *
 * @param mixed $string
 * @param mixed $key
 * @return mixed $retrun
 */
function encrypt($string, $key){

        $result = '';
        $lentgh = strlen($string);
        for($i = 0; $i < $lentgh; $i++) {
                $char = substr($string, $i, 1);
                $keychar = substr($key, ($i % strlen($key))-1, 1);
                $char = chr(ord($char) + ord($keychar));
                $result .= $char;
        }

        return base64_encode($result);
}

/**
 * decrypt()
 *
 * @param mixed $string
 * @param mixed $key
 * @return mixed $return
 */
function decrypt($string, $key){

        $result = '';
        $string = base64_decode($string);
        $lentgh = strlen($string);

        for($i = 0; $i < $lentgh; $i++) {
                $char = substr($string, $i, 1);
                $keychar = substr($key, ($i % strlen($key))-1, 1);
                $char = chr(ord($char) - ord($keychar));
                $result .= $char;
        }

        return $result;
}
?>

Tags: , , , , ,

Design ist…

Design ist wie Klopapier, im Prinzip für’n Arsch, but nice to have.

Tags: , ,

Bestes Wetter

Heute ist es hell,warm und keine Sonne. So könnte es bleiben ;-) Bestes Informatikerwetter

Tags: , ,

Archives by Subject:

Archives by Month: