Below are the top ranked snippets.
9
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.
ex.: chmod u=rwx,g=rwx,o=rwtx ~/myscripts/convert_mask.py
This can be very useful when recovering permissions from a backup.
9
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.
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.
5
BerndSchiffer
Ein Kilometerfresser mit Groovy Console, Inlinetests, Groovy Beans, der Meta-Objekt-Programmierung, Swing, GStrings, Regulären Ausdrücken und Closures gebaut. Läuft mit Groovy 1.0 in der Groovy Console.
A Mile-Eater build with Groovy Console, inline tests, Groovy Beans, Meta-Object-Programming, Swing, GStrings, regular expressions und closures. Runs with Groovy 1.0 in the Groovy Console.
A Mile-Eater build with Groovy Console, inline tests, Groovy Beans, Meta-Object-Programming, Swing, GStrings, regular expressions und closures. Runs with Groovy 1.0 in the Groovy Console.
3
Answer to a groovier solution to Hamlet D'Arcy's Rot13 algorithm. This is the refactored version with less redundance.
4
berkeley_mikeg
I have created this sippet because I VPN into work to check problems or e-mail and had to change my IE settings to surf the internet. With this sippet, once configured will allow you to override your internet explorer proxy settings to connect and browse the internet with one double click of the mouse or as I have done, add it to my VPN profile auto starter and it reconfigures my internet browser after i'm connected.
(this will shut the browser if it's running, make the changes and launch it with the changed configuration)
(this will shut the browser if it's running, make the changes and launch it with the changed configuration)
5
10
8
Class method to read a binary file and copy it to a byte array.
4
Removes every sub-directory in a directory tree that has its name equal to [string] or containing [string] starting from [initial_directory].
4
Walks every subdirectory starting from [initial_dir] and deletes every file in it that contains in its filename a [string]









