yow!
commentscript
a script to comment/uncomment blocks in perl scripts
save this executable perl script in any folder that is included in PATH, or in ~/bin (which is already there in PATH). (and also make sure it is executable if it somehow doesnt work)
Usage: commentscript perlscriptname
where perlscriptname is the... make a wild guess... yip, the script containing the block that you want commented.
Description:
In any perl script, to comment blocks of code, put a block (a collection of consecutive lines, nothing more) between ## and ## (they should both be at the start of a line), and run this script on it (by passing perlscriptname as a command-line argument).
To uncomment, change both the ##'s to ##! and run this script on perlscriptname again.
Example:
print "hi. ";
##
print "hah.";
print " blah hash";
##
print "hash functions are cool";
changes to
print "hi. ";
##
# print "hah.";
#
# print " blah hash";
##
print "hash functions are cool";
and
print "hi. ";
##!
# print "hah.";
#
# print " blah hash";
##!
print "hash functions are cool";
changes to
print "hi. ";
print "hah.";
print " blah hash";
print "hash functions are cool";
ps - for extra safety, the script also makes a backup copy of the original perlscriptname by the name of perlscriptname.backup in the folder that the script (commentscript) is run from.
psst - comments, bug reports, and additional feature requests are... as ever... most welcome.
Showing posts with label iCode. Show all posts
Showing posts with label iCode. Show all posts
Tuesday, March 11, 2008
Monday, March 10, 2008
killprog - handy bash script to kill hung up processes
a handy bash script to kill required processes:
killprog
save this file in your ~/bin/ folder
usage: killprog [program1] [program2] ...
examples:
killprog vlc
killprog firefox
killprog vlc firefox
ps - if it doesnt work, make sure it is an executable.
chmod +x killprog
comments, bug reports, and additional feature requests are welcome :P
save this file in your ~/bin/ folder
usage: killprog [program1] [program2] ...
examples:
killprog vlc
killprog firefox
killprog vlc firefox
ps - if it doesnt work, make sure it is an executable.
chmod +x killprog
comments, bug reports, and additional feature requests are welcome :P
Saturday, December 29, 2007
merry christmas world! u get a firefox extension from me! ho ho ho!

i m santa
and here's ur christmas gift
a brand new
now browse through google search results right there on the search page itself!
click to download
after downloading, drag the extension (xpi) file into firefox and click Install. then restart firefox and go to google.com
search for something. now every search result has a link Open Inline alongside it.
Click on Open Inline. the page that that search result refers to, will open right there! and browse inside that newly opened page, click links, wander around, do whatever.
when done, close the inline page by clicking Close Inline
or open another search result's page simultaneously!
open close open close open open close open close close blah blah
congratulations, u've browsed through all the information you wanted, from varied sources, all from the same old search page! o blimey!
:)
click to download the extension. Or Right Click here and select Save Link as...
OR
there's even a Greasemonkey script goodie!
simply click here to install the greasemonkey script that does basically the same.
merry christmas!
ho ho ho!
ps - the santa cap's not for sale. period.
Subscribe to:
Posts (Atom)