Skip to content

Instantly share code, notes, and snippets.

View willemsst's full-sized avatar

Steven Willems willemsst

View GitHub Profile
@willemsst
willemsst / gist:063aaea023495f0ed17af02f5cd58559
Last active June 6, 2016 20:19
Thoughts on online identity management
As I just saw someone got verified on Twitter (i.e. the little blue v mark on the avatar), I wondered what the process would be to become
verified.
My guess it's quite random and highly influenced by knowing the right people.
But if Twitter would be doing this for all its users by default, it could and probably would make Twitter a nice place again. No more
anonymous cowards harassing other people. There's been plenty of that the last few years and Twitter should act upon it if it wants to
survive and grow its user base again.
But what if we think bigger? What if the internet itself had some concept of identity. Currently, online we can claim whoever we want to
be. Think of the sily gifs around the internet about a dog chatting to a fridge.
### Keybase proof
I hereby claim:
* I am willemsst on github.
* I am willemsst (https://keybase.io/willemsst) on keybase.
* I have a public key whose fingerprint is 8A46 77DF 6479 59FD BAE3 2560 EC51 2B86 D46F F779
To claim this, I am signing this object:
Verifying that +willemsst is my openname (Bitcoin username). https://onename.io/willemsst
@willemsst
willemsst / gist:6898876
Last active December 25, 2015 01:59
stupid int parse test -> stupid int parsing almost twice as fast as the one from the JDK (1.6) Total time: 2.5252283s Avg time: 25.252283ns Total time: 4.094798s Avg time: 40.94798ns
import org.junit.Test;
public class IntParseTest {
private static int parseInt(String s) {
int result = 0;
char x;
boolean negative = false;
for (int i = 0; i < s.length(); i++) {
x = s.charAt(i);
@willemsst
willemsst / SmtpActorTest.groovy
Last active December 24, 2015 22:29
working akka smtp-camel actor test
package be.idevelop.opencom.smtp.server.actor
import akka.actor.ActorRef
import akka.actor.ActorSystem
import akka.camel.Camel
import akka.camel.CamelExtension
import akka.util.Timeout
import be.idevelop.opencom.util.Condition
import org.apache.camel.CamelContext
import org.apache.camel.component.james.smtp.SMTPComponent
@willemsst
willemsst / SmtpActorTest.groovy
Created October 6, 2013 17:40
akka james-smtp camel actor spock test
package be.idevelop.opencom.smtp.server.actor
import akka.actor.ActorSystem
import org.apache.commons.mail.SimpleEmail
import spock.lang.Shared
import spock.lang.Specification
class SmtpActorTest extends Specification {
@Shared
ActorSystem system
@willemsst
willemsst / SmtpActor.java
Created October 6, 2013 17:40
akka james-smtp camel actor
package be.idevelop.opencom.smtp.server.actor;
import akka.actor.*;
import akka.camel.*;
import akka.camel.javaapi.*;
import org.apache.camel.*;
import org.apache.camel.component.james.smtp.*;
import org.slf4j.*;
import scala.concurrent.duration.*;
@willemsst
willemsst / ByteBufferToStringConverter.java
Last active December 20, 2015 12:19
Create a new String from a ByteBuffer with only one char[] (so no Array.copyOf()) It would be nice if we could get rid of the CharBuffer as well, but, it's a start. String has a packaged scoped constructor - which doesn't use Array.copyOf(). It can be accessed through reflection.
package be.idevelop.util;
/**
* MIT License http://opensource.org/licenses/MIT
*
* @author @willemsst
*/
import java.lang.reflect.*;
import java.nio.*;