Skip to content

Instantly share code, notes, and snippets.

Christopher Hunt huntc

Block or report user

Report or block huntc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@huntc
huntc / .gitignore
Created May 3, 2011
test-gemfire-project
View .gitignore
.classpath
.project
.settings
target
BACKUP*
DRLK*
@huntc
huntc / README
Created Jan 29, 2012
socket.io stresstest
View README
1. Start node using the supplied server js e.g.:
node stress-socket.io-server.js
2. Open stress-socket.io.html in your browser
3. Open the console for the above web page in your browser
4. Type "go(1)". You should see something like the following:
Started
Subscribed: 1 Received: 1 Mean: 0.019s Stddev: 0.000s Min: 0.019s Max: 0.019s
Done
5. Now type "go(250)". You should see that 250 are received, but less are for me.
6. After a period of time (say a minute or so), I start seeing the
View HelloWorldViewTest.html
<html>
<head>
<script type="text/javascript" src="../../js/org/codehaus/mojo/almond/0.0.2-alpha-1/almond-0.0.2-alpha-1.js"></script>
<script type="text/javascript" src="../../js/org/codehaus/mojo/qunit-amd/1.5.0-alpha-1/qunit-amd-1.5.0-alpha-1.js"></script>
<script type="text/javascript" src="../../js/org/codehaus/mojo/jquery-amd/1.7.1-alpha-1/jquery-amd-1.7.1-alpha-1.js"></script>
<script type="text/javascript" src="../../js/org/codehaus/mojo/jquery-ui-amd/1.8.16-alpha-1/jquery-ui-amd-1.8.16-alpha-1.js"></script>
<script type="text/javascript" src="../../js/HelloWorld/desktop/HelloWorldView.js"></script>
<script type="text/javascript" src="../../js/HelloWorld/desktop/HelloWorldViewTest.js"></script>
<link rel="stylesheet" type="text/css" href="../../css/qunit.css" />
View pom.scala
/**
* Copyright (c) 2012 to original author or authors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
import org.sonatype.maven.polyglot.scala.model._
implicit val scalaVersion = ScalaVersion("2.10.2")
@huntc
huntc / LocalBrowser.scala
Last active Dec 23, 2015
WebDriver browser ideas
View LocalBrowser.scala
package com.typesafe.webdriver
import akka.actor.{FSM, Props, Actor}
import scala.sys.process._
import java.io.File
import com.typesafe.webdriver.LocalBrowser._
import scala.Some
/**
* Provides an Actor on behalf of a browser. Browsers are represented as operating system processes and are
@huntc
huntc / process.scala
Last active Dec 28, 2015
Prototype Process Actor.
View process.scala
package akka.contrib.process
import akka.actor._
import akka.util.ByteString
import java.io._
import scala.collection.JavaConversions._
import java.lang.{ProcessBuilder => JdkProcessBuilder}
import akka.contrib.process.Process.Started
import akka.contrib.process.StreamEvents.{Done, Ack, Output}
@huntc
huntc / gist:7700511
Last active Dec 29, 2015
Experiments with state transformers for managing file dependencies and other things
View gist:7700511
package com.typesafe.sbt.web
import scalax.collection.Graph
import scalax.collection.GraphEdge.DiEdge
import scala.collection.immutable
import sbt._
import scala.language.higherKinds
/**
* State that represents a directed graph of files.
View Ringo.scala
package com.typesafe.jse
import akka.actor._
import scala.collection.mutable.ListBuffer
import scala.concurrent.blocking
import java.io._
import akka.contrib.process.StreamEvents.Ack
import akka.contrib.process.{Sink, Source}
import scala.collection.immutable
import com.typesafe.jse.Engine.ExecuteJs
@huntc
huntc / a.js
Last active Jan 2, 2016
Shows how NODE_PATH, amdefine and Node can be used together to run things with multiple context paths.
View a.js
/*global define */
// This file for the target/public folder
define(function() {
return 1;
});
@huntc
huntc / main.scala
Created Feb 5, 2014
Illustrates how a single Itinerary or an array of Itinerary objects can be rendered as a List[Itinerary]
View main.scala
package controllers
import play.api._
import play.api.mvc._
import play.api.libs.json._
case class Itinerary(name: String)
object Itinerary {
implicit val format = Json.format[Itinerary]
You can’t perform that action at this time.