Add the relevant webjars to your build file:
libraryDependencies += "org.webjars.bower" % "angular" % "1.3.15"
Add the resources to your server definition:
unfiltered.netty.Server
/** | |
* A Map which tracks the insertion order of entries, so that entries may be | |
* traversed in the order they were inserted. Uses just two purely functional | |
* maps. | |
*/ | |
import scala.collection.immutable.LongMap | |
class LinkedMap[K,V]( | |
entries: Map[K,(V,Long)], |
#!/bin/bash | |
# This script is the reference implementation of how to start the | |
# ENSIME server given an ENSIME config file, bootstrapping via sbt[1]. | |
# It is not intended to be portable across operating systems, or | |
# efficient at caching the results of previous invocations. | |
# Typically it is best to take the basic concepts of this script and | |
# to port it to the natural language of the extensible editor that | |
# intends to support ENSIME. |
Add the relevant webjars to your build file:
libraryDependencies += "org.webjars.bower" % "angular" % "1.3.15"
Add the resources to your server definition:
unfiltered.netty.Server
Every application ever written can be viewed as some sort of transformation on data. Data can come from different sources, such as a network or a file or user input or the Large Hadron Collider. It can come from many sources all at once to be merged and aggregated in interesting ways, and it can be produced into many different output sinks, such as a network or files or graphical user interfaces. You might produce your output all at once, as a big data dump at the end of the world (right before your program shuts down), or you might produce it more incrementally. Every application fits into this model.
The scalaz-stream project is an attempt to make it easy to construct, test and scale programs that fit within this model (which is to say, everything). It does this by providing an abstraction around a "stream" of data, which is really just this notion of some number of data being sequentially pulled out of some unspecified data source. On top of this abstraction, sca
miles@frege:~$ scala | |
Welcome to Scala version 2.11.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_55). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> import scala.language.dynamics | |
import scala.language.dynamics | |
scala> case class Assoc[K, V](value: V) | |
defined class Assoc |
case class Foo[T](x: T) { | |
def map[B](f: T => B) = Foo(f(x)) | |
} | |
object OldWay { | |
def combineLatest[T1, T2](e1: Foo[T1], e2: Foo[T2]): Foo[(T1, T2)] = Foo((e1.x, e2.x)) | |
def combineLatest[T1, T2, T3](e1: Foo[T1], e2: Foo[T2], e3: Foo[T3]): Foo[(T1, T2, T3)] = | |
combineLatest(combineLatest(e1, e2), e3) map { |
#!/bin/bash | |
export PW=`pwgen -Bs 10 1` | |
echo "$PW" > password | |
# Create a self signed certificate & private key to create a root certificate authority. | |
keytool -genkeypair -v \ | |
-alias clientCA \ | |
-keystore client.jks \ |
This gist has been upgraded to a blog post here.
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
/** @jsx React.DOM */ | |
'use strict'; | |
// Components wrapping Twitter Bootstrap stuff | |
// | |
var BSNames = { | |
// This isn't exhaustive. Need to think through what should go here. Should | |
// be exclusive. | |
bsClass: {'column': 'col', 'button': 'btn', 'btn-group': 'btn-group', 'label': 'label', |