Profile

Achievement

first submission:submitting first snipplet

narkisr's Recent Snippets



A simple method of clearing the data of a hard drive (writing zeros all over it).
2 1162 posted 16 years ago by narkisr
Basic file system manipulation in Linux (some commands require sudo).
0 957 posted 16 years ago by narkisr
An example on how to invoke Ant targets which are defined in build.xml.
0 1134 posted 16 years ago by narkisr
This is useful for syncing two folders on different computers over ssh (the default transport of rsync).
1 1084 posted 16 years ago by narkisr
Simple Outlook automation, the idea is to use this in cygwin to send files without opening the outlook UI, to use it place the code under /bin folder and make it executable with chmod +x.
2 1170 posted 16 years ago by narkisr
Simple function which makes it easy to add files to svn in bash (add this to your .bashrc file).
1 1224 posted 16 years ago by narkisr
This example shows how to clone an object from an existing one by using MOP in Groovy, first we find all the writable properties of the cloned object class, secondly we traverse them and on each iteration we copy the value from the current object i...
2 1896 posted 16 years ago by narkisr
Generating MD5 HEX string from either URL or File instance in Groovy (more elegant than the Java version).
1 1797 posted 16 years ago by narkisr
A working example that uses BlaszDS in order to serialize Java object into AMF (this code should be cleaned up a bit), in order for it to compile and work it is required to add flex-messaging-core.jar and flex-messaging-common.jar to the classpath.
0 1293 posted 17 years ago by narkisr
This command lists all the differences that were made between two revisions in SVN.
2 1264 posted 17 years ago by narkisr
A useful AWK one liner, see http://student.northpark.edu/pemente/awk/awk1line.txt for some more
1 1106 posted 17 years ago by narkisr
This is a collection of useful static initializers of Java arrays, lists and maps.
0 833 posted 17 years ago by narkisr
0 978 posted 17 years ago by narkisr
This is as simple as it gets, basiclly this templates shows you how to mock an object methods to any other piece of code that you like (open objects at its simplest glory).
1 1026 posted 17 years ago by narkisr
This example shows how to compile the hello.c file out of the fuse source tar.
0 971 posted 17 years ago by narkisr
A paste from a blog (http://lenkite.blogspot.com/2008/05/access-windows-registry-using-java.html) entry which demonstrates how to access windows registry in Java.
0 1406 posted 17 years ago by narkisr
This snippet shows how to serialize action script object to strings, the serialization method is AMF based, note also that each object must meet three basic rules in order to be serialized properly: ¨1. The constructor must take no arguments...
1 1535 posted 17 years ago by narkisr
A bash script which installs rubygems under ubuntu hardy.
0 893 posted 17 years ago by narkisr
This is an example of how to search within a Ferret index (based upon http://kasparov.skife.org/blog/src/ruby/ferret.html).
1 1123 posted 17 years ago by narkisr
This is a simple example for building a search index with the Ferret library (based upon http://kasparov.skife.org/blog/src/ruby/ferret.html).
1 1276 posted 17 years ago by narkisr
This example shows how to release artifacts into Artifactory by using Buildr, the origin of this code is http://groups.google.com/group/buildr-talk/
1 873 posted 17 years ago by narkisr
This spring context configures a simple hibernate session (for annotated classes).
4 1307 posted 17 years ago by narkisr
This is an example of how to map a Java 5 enum when using Hibernate ORM.
0 1175 posted 17 years ago by narkisr
The data source which can be used in combination with jasper reports.
0 1018 posted 17 years ago by narkisr
Decorator design pattern implemented in Groovy, two implementation are provided, the first is naive and not general, the second is MOP based and can be used in much more scenarios.
0 1456 posted 17 years ago by narkisr
Mediator design pattern implemented in Groovy (based upon http://www.javacamp.org/designPattern/).
1 1285 posted 17 years ago by narkisr
A simple testing assertion which looks up for a line within a file until a pre defined time frame ends (loosely based upon http://www.informit.com/guides/content.aspx?g=java&seqNum=226).
0 1364 posted 17 years ago by narkisr
This script will setup JBoss 4.2.2 to use null persistence (no DB, see http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigJBossMQNullPersistence) when handling JMS messages.
1 1006 posted 17 years ago by narkisr
A very simple way of getting bean instances from Spring context without casting returned object, the assumption is that the bean id's are matching the classes names.
0 1244 posted 17 years ago by narkisr
All you need todo in order to use this is just to add it to your path
0 1198 posted 17 years ago by narkisr