Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
User Journal

Journal Journal: Sound blasting from Slashdots flash ads

I really can't stand these audio based ads that Slashdot has started running, I have no problem with advertisement I think it actually adds to the experience, lots of stuff that I use I've found via ads. So please slashdot stop running these Microsoft server 2012 or what ever, or at least make them pay more, I mean I do notice them more when they start playing in some background slashdot tab.

User Journal

Journal Journal: My URL is my content

A great inebriate hacker once told me "I schould build a content provider service, where the content is in the URL"... It took me about two years to understand what he ment, I think he ment that you can store data in "the cloud" or in the ether between the tubes. So I give openssl and some perl to make it look better:

echo "oh man where is this stored really? The intertubes?" |openssl base64 | perl -pne 'BEGIN{print "data:text/plain;base64,"} chop; END {print "\n"}'

Result:

data:text/plain;base64,b2ggbWFuIHdoZXJlIGlzIHRoaXMgc3RvcmVkIHJlYWxseT8gVGhlIGludGVydHViZXM/Cg==

User Journal

Journal Journal: Making sha1 hashes for backup and integrity checking..

This will link one hash to one file, so if two files have the same hash the latter will overwrite the formers name. Thanks to Perl oneliners and lost+found recovery for inspiration.

find -type f -print0 |
xargs -0 openssl sha1 |
perl -ne '
sub parsesha1{
$sha1=substr($_,-41,40);
$filename=substr($_,5,-44)
}

&parsesha1;

$file_hashes{$sha1}=$filename;

END{
foreach $hash (keys %file_hashes){
print "$hash:",$file_hashes{$hash},"\n"}
} '

Slashdot Top Deals

FORTUNE'S FUN FACTS TO KNOW AND TELL: A giant panda bear is really a member of the racoon family.

Working...