View previous topic :: View next topic |
Author |
Message |
thrashed Apprentice
Joined: 01 Sep 2004 Posts: 294
|
Posted: Sat Nov 27, 2004 12:26 pm Post subject: [DUP] [OT] Zeig mir deine virtuelle Penislänge |
|
|
etwas off topic, aber wenn es "show me your desktop" + konsorten threads gibt, hat dieser thread auch seine Berechtigung
hier das script:
Code: | #!/usr/bin/perl -w
# Based on http://www.hadess.net/files/stuff/vpenis.c
# But I made it logarithmic.
# Currently only for linux
use strict;
my $uptime = "uptime";
my $free = "free";
my $df = "df";
my $cpu_info = "/proc/cpuinfo";
my $size = 0;
my @uptime = `uptime` or die "Could not run $uptime\n";
for (@uptime) {
$size += $1 / 10 if /(\d+) day/;
}
open(my $fh, "<", $cpu_info) || die "Could not open $cpu_info: $!";
while (<$fh>) {
$size += $1 / 30 if /cpu MHz.*:\s+(\d+(?:\.\d+)?)/i;
}
my @free = `free` or die "Could not run $free\n";
for (@free) {
$size += $1 / 1024 / 3 if /^Mem\S*\s+\S+\s+(\d+)/i;
}
my @df = `df -P -k -x nfs` or die "Could not run $df\n";
shift @df;
for (@df) {
my ($fs, $blocks) = split;
$blocks *= 2 if $fs =~ m!/scsi|/sd!;
$size += $blocks/1024/750;
}
# my $result = 7+$size/10; # Original formula
my $result = 7+2*log(1+$size);
printf "Your virtual penis size is %.1f centimeters (%.1f inch)\n", $result, $result / 2.54;
|
mein ergebnis vom desktop rechner:
Code: | $ perl vpenis.pl
Your virtual penis size is 18.4 centimeters (7.3 inch) |
|
|
Back to top |
|
|
Scruffy Tux's lil' helper
Joined: 08 Nov 2004 Posts: 97 Location: 127.0.0.1
|
Posted: Sat Nov 27, 2004 1:05 pm Post subject: |
|
|
Your virtual penis size is 17.8 centimeters (7.0 inch) _________________ Schedule conflict |
|
Back to top |
|
|
Earthwings Bodhisattva
Joined: 14 Apr 2003 Posts: 7753 Location: Germany
|
|
Back to top |
|
|
Anarcho Advocate
Joined: 06 Jun 2004 Posts: 2970 Location: Germany
|
Posted: Sat Nov 27, 2004 1:08 pm Post subject: |
|
|
Also mein Server:
Your virtual penis size is 20.5 centimeters (8.1 inch)
und meine Workstation:
Your virtual penis size is 19.4 centimeters (7.6 inch)
Aber das wird ja noch mehr, da die uptime drinne ist... _________________ ...it's only Rock'n'Roll, but I like it! |
|
Back to top |
|
|
|