beaglebros.com v2.0

HOME SOLARIS/UNIX RANDOM CRAP EMPEG BEAGLEBROS CA IPv6

Squid CGI configuration

Here's a perl CGI script that will let you configure your Squid proxy via a browser. It needs to be suid'ed enough to allow the script to run "squid -k reconfigure" and write a new configuration file. It needs to run on the same machine that runs the Squid server and it should be behind some sort of authorization mechanism. There are “constants” that you should probably change. It's also not very pretty. Hopefully this will change.




Random Javascript goodness

Make an HTML textarea the “same” height as the browser:
function sizeTextArea(){
        var winHeight=window.innerHeight;
        document.FormName.TextareaName.style.height=winHeight-30 + "px";
}
Then set the form's name attribute to FormName and the textarea's name attribute to TextareaName.
Then set the body's onLoad and onResize attributes to sizeTextArea();. That should do it.




Some lookups for Internet Explorer

Create links with the following texts as the URL in IE. You'll be able to highlight a word and click the link and it'll automatically take you to its definition. Other uses should be obvious.

javascript:qtext=document.selection.createRange().text;if(!qtext){void(qtext=prompt('Enter%20word%20to%20find%20in%20Merriam-Webster%20Dictionary:',''))}if(qtext){qtext=qtext.split(/[ \']/)[0];if (document.URL=='about:blank') {location.href='http://www.m-w.com/cgi-bin/dictionary?'+escape(qtext);} else {void(window.open('http://www.m-w.com/cgi-bin/dictionary?'+escape(qtext)))}}

javascript:qtext=document.selection.createRange().text;if(!qtext){void(qtext=prompt('Enter%20word%20to%20find%20at%20Dictionary.com:',''))}if(qtext){qtext=qtext.split(/[ \']/)[0];if (document.URL=='about:blank') {location.href='http://www.dictionary.com/cgi-bin/dict.pl?term='+escape(qtext);} else {void(window.open('http://www.dictionary.com/cgi-bin/dict.pl?term='+escape(qtext)))}}



last updated $Date: 2005/03/05 00:57:42 $