iTunes Remove Dead Tracks
on Mar 20, 2007 at 03:54
|
0 replies
|
by slithymonster
|
|
the iTunes SDK code example has an error! it deletes elements out of a list and then continues to use the previous indices (even though the list is now smaller).
The solution: delete the tracks backwards.
|
Class::Basic
on Mar 19, 2007 at 15:41
|
0 replies
|
by rlb3
|
|
This is an unholy combination of ideas and interface from Moose and ideas and code from Class::STD. Its mostly a toy but it does work. How well it works is a different story...
|
Random wallpaper harvester
on Mar 18, 2007 at 07:34
|
3 replies
|
by Snarius
|
|
This script (ab)uses the google image search to find an image of adequate proportions from a random word from your computers dictionary file, and attempts to download it and set it as your desktop wallpaper. If you supply words arguments, then this script will use them as the basis of your search.
This is originally based on Hossman's thing that does the same thing, which uses code that was part of Webcollage. (I couldn't find it now.)
Whatever. A well oiled machine needs many ingredients.
Requires gnome2 to set the background. Could use help setting it for other systems.
EDIT:replacing dos-style newlines. how did those get there?
EDIT 2: try flickr mode now.
|
Prst
on Mar 11, 2007 at 19:14
|
2 replies
|
by Sixtease
|
|
Prst stands for "Preprocessor for Static HTML".
Prst is for generating a HTML page with a lot of code that would be cumbersome to write by hand. It's like PHP only you write in Perl and it's not intended for dynamic page generation.
To generate a webpage, you write a template where inside <% %> tags you call perl functions and their output is substituted for the tag.
See Prst's webpage.
|
Huffman coding in pure Perl
on Mar 04, 2007 at 06:35
|
6 replies
|
by vrk
|
|
This is a straightforward implementation of Huffman coding in pure Perl. The module is not intended to be used in real applications as such; rather, this is an educational module, which can be used to demonstrate how it can be done.
Included in the module documentation are a simple compression and an equally simple decompression program, which demonstrate how the module can be used in compressing text files.
UPDATE: use 5.008_000 instead of 5.000_008, of course. Thanks, geekphilosopher!
UPDATE 2: Removed the use line altogether. tye has good arguments why it's harmful.
|
jsdoc - pod for JavaScript
on Feb 23, 2007 at 16:47
|
1 reply
|
by diotalevi
|
I've been writing JavaScript libraries recently and wanted some nice inline place to put documentation but also wanted a way to extract it. That's what jsdoc does. This just feeds all the comments in your code to perldoc. Here's a small example:function mapcar (func, col) {
/*
=item ARRAY = mapcar( func, col )
Apply FUNC to each element of COL, and make an array of the
results. The result is an array just as long as COL. COL may be
anything that has a length attribute and can be indexed into lik
+e an
array.
*/
var out = new Array();
for ( var i = 0; i < col.length; ++i ) {
var elt = col[i];
var val = func( elt );
out.push( val );
}
return out;
}
becomes... =item ARRAY = mapcar( func, col )
Apply FUNC to each element of COL, and make an array of the
results. The result is an array just as long as COL. COL may be
anything that has a length attribute and can be indexed into like an
array.
=cut
|
DeathClock
on Feb 21, 2007 at 16:48
|
1 reply
|
by bpoag
|
DeathClock attempts to determine how much time remains before a given filesystem has zero free space remaining, based on how quickly existing storage is being utilized. It will send a panic message via email to one or more recipients depending upon how confident it is that death (zero free space in the filesystem) is imminent. DeathClock can be used as a monitoring tool as well, spitting out predictions of woeful and untimely filesystem demise at user-specified intervals. It can either be run as a one-time gauge, or set to monitor a filesystem constantly. DeathClock is a morbid script that lives a mostly solitary life, with the possible exception of his partially mummified mother, in a gothic-inspired home on a hill overlooking a motel. It enjoys taxidermy, quiet dinners with the motel guests, and attacking unsuspecting customers while they shower.
Example output:
# /usr/local/bin/deathclock.pl /prod 37 1 1 0 foo@bar.com
DeathClock: Starting up..
DeathClock: Collecting 37 seconds of growth information for /prod. Please wait......................................
DeathClock: 85094.79 MB remaining in /prod. Estimated time of death: 7w 5d 9h 56m 9s.
|
Link Hunter
on Feb 13, 2007 at 10:39
|
3 replies
|
by wizbancp
|
|
A script for exploring site and catch link
simply specify the starting url and the searching depth (sorry for my english!:-))
at the end the script produce a text files with the address catched.
|
Twitter POSTer
on Feb 12, 2007 at 05:28
|
0 replies
|
by wizbancp
|
|
A code for posting update to your twitter account :-)
|
Twitter Reader
on Feb 12, 2007 at 04:03
|
0 replies
|
by wizbancp
|
|
Is a code for visualize the last post of you and your friend's on twitter.
configurable number of post to read (default 8)
|