Skip to content

Instantly share code, notes, and snippets.

View RayRoestenburg's full-sized avatar

Raymond Roestenburg RayRoestenburg

View GitHub Profile
@RayRoestenburg
RayRoestenburg / RemoteExampleForBangBang.scala
Created June 10, 2011 10:11
What is the expected behavior of remote bangbang?
package unit.akka
import org.junit.Test
import akka.remote.netty.NettyRemoteSupport
import akka.actor.Actor
import akka.event.slf4j.Logging
import org.scalatest.junit.{ShouldMatchersForJUnit, JUnitSuite}
import org.scalatest.BeforeAndAfterAll
import akka.actor.Actor._
import java.nio.channels.ClosedChannelException
@RayRoestenburg
RayRoestenburg / gist:823180
Created February 11, 2011 22:29
Some usage examples of akka.util.TestKit
package unit.akka
import org.scalatest.matchers.ShouldMatchers
import org.scalatest.{WordSpec, BeforeAndAfterAll}
import akka.actor.Actor._
import akka.util.duration._
import akka.util.TestKit
import java.util.concurrent.TimeUnit
import akka.actor.{ActorRef, Actor}
import util.Random
@RayRoestenburg
RayRoestenburg / autoproxy.pac.js
Created March 17, 2010 12:14
autoproxy pac file for company and home network
function FindProxyForURL(url, host) {
var lhost = host.toLowerCase();
var ip = myIpAddressEx();
// exclude localhost and some specific range on company network (123.45.*)
if ((lhost == "localhost")
|| (shExpMatch(lhost, "localhost.*"))
|| (lhost == "127.0.0.1")
|| shExpMatch(lhost, "123.45.*")) {
return "DIRECT";
}
package my.gists.test;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import junit.framework.Assert;
import org.junit.Test;
import com.mongodb.BasicDBObject;