Skip to content

Instantly share code, notes, and snippets.

View huntc's full-sized avatar

Christopher Hunt huntc

View GitHub Profile
@huntc
huntc / mesos-salve.env
Last active July 13, 2016 05:14
MESOS environment variables
MESOS_AGENT_ENDPOINT=10.0.1.187:5051
MESOS_CHECKPOINT=0
MESOS_DIRECTORY=/tmp/mesos/slaves/e23ea3f5-0c2c-4220-8352-ec387538170f-S0/frameworks/e23ea3f5-0c2c-4220-8352-ec387538170f-0008/executors/conductr.node.christophersmbp.lan.executor/runs/3e175322-d045-41dc-975e-1f4394bffe68
MESOS_EXECUTOR_ID=conductr.node.christophersmbp.lan.executor
MESOS_EXECUTOR_SHUTDOWN_GRACE_PERIOD=5secs
MESOS_FRAMEWORK_ID=e23ea3f5-0c2c-4220-8352-ec387538170f-0008
MESOS_NATIVE_JAVA_LIBRARY=/usr/local/Cellar/mesos/0.28.1/lib/libmesos-0.28.1.dylib
MESOS_NATIVE_LIBRARY=/usr/local/Cellar/mesos/0.28.1/lib/libmesos-0.28.1.dylib
MESOS_SANDBOX=/tmp/mesos/slaves/e23ea3f5-0c2c-4220-8352-ec387538170f-S0/frameworks/e23ea3f5-0c2c-4220-8352-ec387538170f-0008/executors/conductr.node.christophersmbp.lan.executor/runs/3e175322-d045-41dc-975e-1f4394bffe68
MESOS_SLAVE_ID=e23ea3f5-0c2c-4220-8352-ec387538170f-S0
@huntc
huntc / a.js
Last active January 2, 2016 18:59
Shows how NODE_PATH, amdefine and Node can be used together to run things with multiple context paths.
/*global define */
// This file for the target/public folder
define(function() {
return 1;
});
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 / gist:7700511
Last active December 29, 2015 16:58
Experiments with state transformers for managing file dependencies and other things
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.
@huntc
huntc / process.scala
Last active December 28, 2015 01:59
Prototype Process Actor.
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 / LocalBrowser.scala
Last active December 23, 2015 12:19
WebDriver browser ideas
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 / pom.scala
Last active December 21, 2015 21:18
pom for tesla-polyglot-scala/pom.xml (original xml here: https://github.com/huntc/tesla-polyglot/blob/master/tesla-polyglot-scala/pom.xml)
/**
* 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")
<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" />
@huntc
huntc / README
Created January 29, 2012 10:31
socket.io stresstest
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
@huntc
huntc / .gitignore
Created May 3, 2011 21:15
test-gemfire-project
.classpath
.project
.settings
target
BACKUP*
DRLK*