Profile
Achievement
narkisr's Recent Snippets
- All /
A simple method of clearing the data of a hard drive (writing zeros all over it).
2
654
posted 15 years ago by narkisr
Basic file system manipulation in Linux (some commands require sudo).
0
500
posted 15 years ago by narkisr
An example on how to invoke Ant targets which are defined in build.xml.
0
611
posted 15 years ago by narkisr
This is useful for syncing two folders on different computers over ssh (the default transport of rsync).
1
580
posted 15 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
620
posted 15 years ago by narkisr
Simple function which makes it easy to add files to svn in bash (add this to your .bashrc file).
1
693
posted 15 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
1177
posted 15 years ago by narkisr
Generating MD5 HEX string from either URL or File instance in Groovy (more elegant than the Java version).
1
1143
posted 15 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
734
posted 15 years ago by narkisr
This command lists all the differences that were made between two revisions in SVN.
2
719
posted 15 years ago by narkisr
A useful AWK one liner, see http://student.northpark.edu/pemente/awk/awk1line.txt for some more
1
601
posted 15 years ago by narkisr
This is a collection of useful static initializers of Java arrays, lists and maps.
0
436
posted 15 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
573
posted 15 years ago by narkisr
This example shows how to compile the hello.c file out of the fuse source tar.
0
542
posted 15 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
865
posted 15 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
907
posted 15 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
692
posted 15 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
792
posted 15 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
442
posted 16 years ago by narkisr
This spring context configures a simple hibernate session (for annotated classes).
4
772
posted 16 years ago by narkisr
This is an example of how to map a Java 5 enum when using Hibernate ORM.
0
649
posted 16 years ago by narkisr
The data source which can be used in combination with jasper reports.
0
523
posted 16 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
878
posted 16 years ago by narkisr
Mediator design pattern implemented in Groovy (based upon http://www.javacamp.org/designPattern/).
1
734
posted 16 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
820
posted 16 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
532
posted 16 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
714
posted 16 years ago by narkisr
All you need todo in order to use this is just to add it to your path
0
682
posted 16 years ago by narkisr