Computers and Technology
In my spare time, I do a bit of Perl programming. I am a fairly regular contributer to the FormBuilder project, and I have a couple modules on CPAN. I run Slackware Linux with Dropline Gnome on both my desktop and laptop, so many of the computer related materials you'll find here have a strong *nix bias.
What follows is a (small) collection of scripts and programs that I have written, as well as assorted web-related tips and tricks.
Scripts and Programs
USC Wireless Login Script
Since I got sick of having to use the USC Wireless login webpage (especially when I had no other reason to pull up a browser), I put together a short command-line USC Wireless login script. It is written in Perl, and requires the LWP, Crypt::SSLeay, and Term::ReadKey libraries.
Email Script
For reading and managing my email, I use a combination of fetchmail, maildrop, and mutt. To go along with these, I wrote a short email shell script. It checks if it appears to be running under X. If so, it launches mutt in a new gnome-terminal; the window size is set in the script, and the font size (and other preferences) are from a GNOME terminal profile named "mutt". If not (i.e. I'm working from a regular console), the script just launches mutt.
Web-Related Stuff
Toys
First, a couple of amusements that I have put together. The first is a magnetic poetry board. The second (and simpler) is a Shakespearean insult generator.
USC Web Space
The servers you need to SSH/SFTP to in order to manage your USC webspace are nunki.usc.edu and aludra.usc.edu (either one will do). This information was next to impossible to find on USC's computer support site; that's why I'm publishing it here. Also, before you are able to host a publicly accessible website, you need to log in to one of those servers and run the requestwww program.
Secure X forwarding works on both of these servers. Just connect using ssh -Y username@nunki.usc.edu. I find this useful to run vim with a GUI interface, a.k.a. gvim. But since the USC servers don't have a symlink by that name, so you have to launch it using vim -g.
Well-behaved Pop-up Windows
While working on the Rude Mechanicals' Oedipus/Antigone site, I finally arrived at what I consider a decent solution for intelligent, accessible, don't-have-to-be-annoying popup windows. Start with the advice from A List Apart's Accessible Pop-up links article and put the url in the href
attribute and the Javascript stuff in the onclick
handler:
<a href="popup.html" onclick="window.open('popup.html','mywindow')">Popup link</a>
That second argument to the window.open
function is the window name for the new window to be opened. This is how we will tell whether the window in question was opened via your JavaScript enhanced link or if the user manually requested a new window or tab.
Then, in your popup.html file, add this to create a context-sensitive link that will either close the window (if it has been popped up) or go to some other URL (presumably back to somwhere) if the user has manually opened it into a new window or new tab:
<script type="text/javascript"> if (window.name == "mywindow") { // popup window document.write('<a href="javascript:window.close()">Close</a>'); } else { // not a popup (e.g. new tab or new window) document.write('<a href="../">Back</a>'); } </script> <noscript><a href="../">Back</a></noscript>
The noscript
element also makes sure the close/back link works in situations where Javascript is not available.
To see this in action, have a look at the Oedipus/Antigone Cast & Crew page.
Firefox Quick Search Bookmarks
These are some of the Firefox Quick Search Bookmarks that I use frequently.
Name | Keyword | URL |
---|---|---|
LiveJournal | lj | http://%s.livejournal.com |
LiveJournal Friendslist | ljf | http://%s.livejournal.com/friends/ |
IMDb Search | imdb | http://imdb.com/find?s=all&q=%s |
Google Maps | map | http://maps.google.com/maps?q=%s |
Stanford Encyclopedia of Philosophy | sep | http://plato.stanford.edu/search/searcher.py?query=%s |
NOAA/NWS Weather Forecast by Zip Code | weather | http://forecast.weather.gov/zipcity.php?inputstring=%s |
Programming | ||
Perl documentation on CPAN | perldoc | http://search.cpan.org/perldoc?%s |
CPAN search | cpan | http://search.cpan.org/search?query=%s&mode=all |
PHP Function Reference | php | http://php.net/search.php?pattern=%s&show=quickref |
IETF RFC | rfc | http://tools.ietf.org/html/rfc% |
Package Tracking by Tracking Number | ||
UPS | ups | http://wwwapps.ups.com/ietracking/tracking.cgi?tracknum=%s |
USPS | usps | https://tools.usps.com/go/TrackConfirmAction.action?tLabels=%s |
FedEx | fedex | http://www.fedex.com/Tracking?tracknumbers=%s |
© 2005-2006 by Peter Eichman. All rights reserved.
Valid XHTML and CSS. Made with vim.