Below are the top ranked snippets.

ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

« Previous 1 2 3 4 5 6 7 8 9  ...  55 56 Next »
3
Date Submitted Thu. Nov. 15th, 2007 2:37 PM
Revision 1
Helper BerndSchiffer
Tags groovy
Comments 1 comments
Answer to a groovier solution to Hamlet D'Arcy's Rot13 algorithm. This is the refactored version with less redundance.
8
Date Submitted Mon. Aug. 7th, 2006 4:48 PM
Revision 1
Scripter bertheymans
Tags Date | Java | Time
Comments 0 comments
If you only want to compare yyyy-mm-dd you can use the java.sql.Date class, the valueOf method does the trick. It's perfectly safe as the sql Date class is a subclass of the Date class.

Check out the docs here for more detail.

enjoy
5
Date Submitted Mon. Aug. 14th, 2006 7:31 AM
Revision 1
Scripter bertheymans
Tags bash | linux | shell
Comments 1 comments
Recursively removes files or directories with a given name, using find.

I most frequently use it to remove 'CVS' or '.svn' directories from sourcepackages that still have the versioning information in them.
6
Date Submitted Mon. Aug. 14th, 2006 7:43 AM
Revision 1
Scripter bertheymans
Tags bash | shell | ssh
Comments 3 comments
This adds your ssh public key to the authorized_keys on a remote server. The key file in the snippet is called id_dsa.pub, yours may have another name but this is standard for DSA encryption.

To learn more about ssh I heartly recommend this: SSH tips and tricks
7
Date Submitted Thu. Sep. 21st, 2006 1:25 PM
Revision 1
Scripter bertheymans
Tags bash | fun | linux | unix
Comments 0 comments
This one-liner is great, it lists the commands you have used by popularity. At present, the 'cd' command wins in my history file with 140. Followed by ls (93) and ssh (56). What are your top 3 commands

Snippet source: ibm
9
Date Submitted Fri. Oct. 13th, 2006 8:03 AM
Revision 1
Scripter bertheymans
Tags chmod | linux | python | system | unix
Comments 0 comments
This python class converts a permission mask in symbolic format (the kind a diretcory listing produces, ex.: drwxr-xr-x) to a string that's usable in a chmod command.

ex.: chmod u=rwx,g=rwx,o=rwtx ~/myscripts/convert_mask.py

This can be very useful when recovering permissions from a backup.
9
Date Submitted Wed. Dec. 27th, 2006 9:40 AM
Revision 1
Scripter bertheymans
Tags Java | List | Set | uniqueness
Comments 2 comments
This is a very convenient way to remove all doubles from a List in Java. The only prerequisite is that the elements in the list have proper equals and hashCode methods.

It work by using the constructor of a Set that takes a Collection as an argument.

I poured the snippet in a little program so can run it straight away.
24
Date Submitted Sun. Dec. 24th, 2006 7:10 PM
Revision 1
Beginner bhmahler
Tags HTML | JavaScript | PHP
Comments 4 comments
This is a PHP and JavaScript Image gallery that I created. There are 2 uses for this.
1.) You can save it as index.php and place in a folder containing images and it will display the images in that folder.
Example:
place index.php in images/folder
http://yoursite.com/images/folder/
This will display all images in that folder

2.) Pass in the path to the folder to display in the url
Example:
Save as imagegallery.php
http://yoursite.com/imagegallery.php?path=images/folde
4
Date Submitted Fri. Jun. 29th, 2007 9:40 PM
Revision 1
Beginner bhmahler
Tags "VB.NET"
Comments 1 comments
There are two methods in this example. One uses directory services the other uses API. Both will return a list of computer names on your network
8
Date Submitted Wed. Aug. 23rd, 2006 6:07 PM
Revision 1
Beginner billism
Tags ASCII | C | conversion | CPlusPlus | EBCDIC
Comments 2 comments
Convert an ebcdic buffer to an ascii buffer.
« Previous 1 2 3 4 5 6 7 8 9  ...  55 56 Next »