I hereby claim:
- I am martijnvogten on github.
- I am martijnvogten (https://keybase.io/martijnvogten) on keybase.
- I have a public key ASDeu7j8p6PhGdRHVsf75SUxDl9HRf_7acikT8m8QCbC3wo
To claim this, I am signing this object:
| class Article { | |
| Long id; | |
| String title; | |
| String content; | |
| User author; | |
| } | |
| class User { | |
| Long id; |
| DB.update("user", {hash: passwordHash, salt: passwordSalt}, {id: userId}); |
I hereby claim:
To claim this, I am signing this object:
| import java.io.ByteArrayOutputStream; | |
| import java.io.OutputStream; | |
| import java.io.PrintStream; | |
| import org.slf4j.Logger; | |
| public class LoggingOutputStream extends OutputStream { | |
| public static void redirectSysOutAndSysErr(Logger logger) { | |
| System.setOut(new PrintStream(new LoggingOutputStream(logger, LogLevel.INFO))); |
| jvm.fetchBytes = function(url) { | |
| var req = new XMLHttpRequest(); | |
| req.open('GET', url, false); | |
| // XHR binary charset opt by Marcus Granado 2006 [http://mgran.blogspot.com] | |
| req.overrideMimeType('text/plain; charset=x-user-defined'); | |
| req.send(null); | |
| if (req.status != 200) { | |
| throw "Could not load file"; |
| if(/msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent)) { | |
| var IEBinaryToArray_ByteStr_Script = | |
| "<!-- IEBinaryToArray_ByteStr -->\r\n"+ | |
| "<script type='text/vbscript'>\r\n"+ | |
| "Function IEBinaryToArray_ByteStr(Binary)\r\n"+ | |
| " IEBinaryToArray_ByteStr = CStr(Binary)\r\n"+ | |
| "End Function\r\n"+ | |
| "Function IEBinaryToArray_ByteStr_Last(Binary)\r\n"+ | |
| " Dim lastIndex\r\n"+ | |
| " lastIndex = LenB(Binary)\r\n"+ |