my $dir = getcwd;
@fdirectory = readdir(DIR);
open (CLEAN_LIST, "cleanup.clean") || print "failed to open";
@clean_list = <clean_list>;
$file = $_;
$clean_list2 = $_;
$clean_list2 =~ s/\n//;
if ($file =~ /$clean_list2/ig)
$clean_list2 =~ s/\\//;
$t = $clean_list2;
`move "$file" "directory$t"`;
I remember making this a while back to clean up every file in the same directory the script’s in, so long as the file’s extension is specified in “cleanup.clean”, separated by new lines. Every now and then I run the script and clear everything off my desktop. It’s great.
Lawlz. After spending days upon days, on and off, messing around with C, making pointers do backflips then double backflips as those darn double pointers point to other pointers, THEN debugging several hundred segmentation fault errors, I finally made a sound playing plugin for Pidgin.
The reason that all of the above took place is not only because I used C (which I’m unfamiliar with), but because I decided I wanted this plugin to use a binary search tree implementation; it reads a text file and makes a hash for each line, which goes into the binary search tree. Because of this it caches well and won’t ever slow down, unless you have a 1GB text file, in that case, it’s only limited by your memory, but still will cut the search by half each time it fails to find the hash.
Anyhow, if anyone’s interested in the plugin and has/is willing to try Pidgin, the source code and plugin is up at http://archduke.homedns.org:900/drag/p_Gestures/ ; the text and sound file there are examples of how to get this to work. The text file is tab separated. Each line contains the / command, what you’ll say when you type that command, and the location of the sound file–the / command is ended with a space. Just extract the zip file to pidgin’s root directory, then activate the plugin (name is self-explanatory). If the other person has the plugin and the particular hash, then it will play on their side. Let me know if you want an example or something. Optimizations, bug fixes, add-ons, and standardization will come later… It’s very utilitarian at the moment >>.
So far, it’s working perfectly–could have missed something though because I’m dead tired…