This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ankerl.proxy; | |
import java.lang.reflect.InvocationHandler; | |
import java.lang.reflect.Method; | |
import java.lang.reflect.Proxy; | |
import java.util.HashMap; | |
import java.util.Map; | |
/** | |
* Creates an intermediate proxy object for a given interface. All calls are |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# created by Martin Ankerl http://martin.ankerl.com/ | |
class String | |
# creates an array of characters | |
def letters | |
unpack("c*") | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# The program e is a command line utility that extracts lots of | |
# different archives. It is very simple and can be extended very easily. | |
# | |
# It is inspired by how firewall use their rulesets, and works like this: | |
# | |
# * For each file that has to be extracted, the rules are matched one after the other. | |
# * When a rule matches (either by the filetype or filename), the command is executed. | |
# * If the command does not return an error code the extraction is considered successful, | |
# otherwise the next rules are matched. |
NewerOlder