Skip to content

Instantly share code, notes, and snippets.

View cessationoftime's full-sized avatar

Chris Van Vranken cessationoftime

  • Akron, OH
View GitHub Profile
# https://github.com/nix-community/nix-direnv
# https://github.com/oxalica/rust-overlay
{
description = "A basic flake with a shell";
nixConfig.bash-prompt = "\[rust-plot\]($(parse_git_branch))$ ";
inputs.nixpkgs-pinned.url = "github:NixOS/nixpkgs?rev=85f1ba3e51676fa8cc604a3d863d729026a6b8eb";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.rust-overlay.url = "github:oxalica/rust-overlay";
{ pkgs ? import <nixpkgs> {} }: with pkgs;
stdenv.mkDerivation {
name = "frontend";
src = ../.;
buildInputs = [ elmPackages.elm nodejs nodePackages.yarn ];
HOME=".";
@cessationoftime
cessationoftime / botos3upload.py
Created May 13, 2017 20:17 — forked from SavvyGuard/botos3upload.py
Use boto to upload directory into s3
import boto
import boto.s3
import os.path
import sys
# Fill these in - you get them when you sign up for S3
AWS_ACCESS_KEY_ID = ''
AWS_ACCESS_KEY_SECRET = ''
# Fill in info on data to upload
@cessationoftime
cessationoftime / autosuggest.elm
Last active March 24, 2017 23:56 — forked from TheSeamau5/autosuggest.elm
Autosuggest with caching in Elm
import Dict exposing (Dict)
import Html exposing (Html, div, text, input, ul, li)
import Html.Events exposing (..)
import Task exposing (Task)
import String
---------------------------
main =
Html.program
@cessationoftime
cessationoftime / ConfigurableAssets.scala
Last active January 10, 2017 22:59 — forked from drcharris/ConfigurableAssets.scala
Use different assets for different configurations with Play Framework
package controllers
import play.api.Play
import play.api.mvc.Action
import play.api.mvc.AnyContent
import com.google.inject.Inject
import play.api.http.HttpErrorHandler
class ConfigurableAssets @Inject() (playConfig: play.api.Configuration, errorHandler: HttpErrorHandler) extends AssetsBuilder(errorHandler) {
@cessationoftime
cessationoftime / FirewallMain.scala
Created November 21, 2012 02:24
Attempt to use Bridj to retrieve information about the firewall
package firewall
import org.bridj.Pointer
import org.bridj.BridJ
import org.bridj.Pointer
import org.bridj.cpp.com.COMRuntime
object FirewallMain extends App {
val x: INetFwMgr = COMRuntime.newInstance(classOf[INetFwMgr]);
val point = Pointer.allocatePointer(classOf[INetFwPolicy]);
@cessationoftime
cessationoftime / Communication.scala
Created November 8, 2012 03:07
akka-remote connection forcing wont shutdown immediately, must wait for execution-pool-keepalive
case "bind" =>
val newRemoteActorsMap = routerConnectionOption match {
//avoid trying to connect to self.
case Some(localAkkaConnection) if localAkkaConnection != remoteAkkaConnection ?
//create a new actor for the remote node to send to
val localVoiceRecipient = context.actorOf(Props[VoiceRecipient], remoteAkkaConnection.actorNameString)
//get a reference to the textChat/voicechat actor on the remote node that the we should send to.
val remoteChatDisplayBox = context.actorFor(remoteAkkaConnection.uriString + """/user/chatDisplayBox""")
//akka://node/user/mq-connection/$a/21EC20203AEA1069A2DD08002B30309D/747411172553]
@cessationoftime
cessationoftime / prjNodeproguardCfg.sbt
Created November 7, 2012 02:31
Merge reference.conf for proguard
//xsbt-proguard-plugin
seq(ProguardPlugin.proguardSettings :_*)
//filter resource files from JARs
makeJarFilter <<= (makeJarFilter) {
(makeFilter) =>
val (makeInJarFilter,makeOutJarFilter) = makeFilter;
val akkas = List("akka-remote","akka-actor", "akka-agent", "akka-camel", "akka-amqp")
val InFilter =
(file:String) => file match {
@cessationoftime
cessationoftime / portforward
Created June 16, 2012 22:44
Akka port forwarding error. RouterInternetIP = 74.74.74.74
[DEBUG] [2012-06-16 18:20:43,514] [node-akka.actor.default-dispatcher-9] (akka.actor.ActorSystemImpl) : RemoteServerClientConnected@akka://node@192.168.10.250:2552: Client[akka://node@192.168.56.1:2552]
[ERROR] [2012-06-16 18:20:43,528] [node-akka.actor.default-dispatcher-9] (NettyRemoteTransport(akka://node@192.168.10.250:2552)) : dropping message TextMessage(Magnan,test) for non-local recipient akka://node@74.74.74.74:2559/user/chatDisplayBox arriving at akka://node@192.168.10.250:2552 inbound address is akka://node@192.168.10.250:2552
[ERROR] [2012-06-16 18:21:01,448] [node-akka.actor.default-dispatcher-18] (NettyRemoteTransport(akka://node@192.168.10.250:2552)) : dropping message TextMessage
(Magnan,huh) for non-local recipient akka://node@74.74.74.74:2559/user/chatDisplayBox arriving at akka://node@192.168.10.250:2552 inbound address is akka://node@192.168.10.250:2552
[DEBUG] [2012-06-16 18:23:14,663] [node-akka.actor.default-dispatcher-18] (RemoteClient(akka://node)) : Starting remote client connection
@cessationoftime
cessationoftime / XampleSpec.scala
Created April 28, 2012 16:04
Akka MultiJVM testing example with barriers
package sample
import org.scalatest.WordSpec
import org.scalatest.matchers.MustMatchers
import org.scalatest.BeforeAndAfterAll
import akka.remote.AbstractRemoteActorMultiJvmSpec
import akka.remote.AkkaRemoteSpec
object XampleMultiJvmSpec extends AbstractRemoteActorMultiJvmSpec {
override def NrOfNodes = 2