Below are the top ranked snippets.
12
Over the summer, I worked on a project in which I needed to parse logfiles which were in the following format:
IP|USE|TIME>IP2|USE2|TIME2>
and so on.
When I parsed them to display the log file in a user-friendly fashion, I used the following code:
IP|USE|TIME>IP2|USE2|TIME2>
and so on.
When I parsed them to display the log file in a user-friendly fashion, I used the following code:
8
shortkid422
This will return a boolean (true/false) if the email address is valid or not.
6
Prints the user's IP address and localtime on a web page.
9
This is a little example of how to use threads in Perl. It creates three threads and runs them... That's it...
5
Easy to use FullScreen script
8
You can search for "@" or something like mail information in your page source code. You'll find nothing.
You can have link of your mail with a title or just you mail address as the title. Hope this code have no problem...
You can have link of your mail with a title or just you mail address as the title. Hope this code have no problem...
8
This little tool is pretty useful for administrators who wear the hat of both system admin and DBA on Linux/MySQL boxes. I wrote it as kind of a joke for our Perl developers, but now I use it just about every day for everything from at prompt hackups to full on table space utilization monitoring scripts.
The snippet has the library script that you can source into scripts that actually do work, as well as a script that uses the functions in the libraries. Anyone who has used the C API should be able to relate to using this script.
It's pretty fast and lightweight. It makes only one external call to mysql and sed per query. The rest is all bash builtins. Requires bash > 3.0
The snippet has the library script that you can source into scripts that actually do work, as well as a script that uses the functions in the libraries. Anyone who has used the C API should be able to relate to using this script.
It's pretty fast and lightweight. It makes only one external call to mysql and sed per query. The rest is all bash builtins. Requires bash > 3.0
7
A lot of time shell scripts need to do some sort of math. Bash's innability to do floating point arithmatic has lead to some pretty neat workarounds, often times these workarounds are slow. If you need a lot of calculations done with speed, you'll find this snippet useful
8
Load images more quickly in a web page by having the browser cache them before they are requested by the user.
This script specifies the location of images that share a common folder. It can be used for multiple images and folders.
This method uses less code and is more maintanable than specifying the location of each image individually.
This script specifies the location of images that share a common folder. It can be used for multiple images and folders.
This method uses less code and is more maintanable than specifying the location of each image individually.
4
Hide CSS styles from Opera by substituting Latin letter "r" for Unicode character 82 in the media attribute "screen" of the style tag.
Tested in browsers based on Netscape, Mozilla, and Internet Explorer for PC.
Tested in browsers based on Netscape, Mozilla, and Internet Explorer for PC.









