Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
package go | |
import java.util.concurrent.{ | |
BlockingQueue => JBlockingQueue, | |
ArrayBlockingQueue => JArrayBlockingQueue | |
} | |
object Channel { | |
def empty[A]: Channel[A] = new BlockingChannel() | |
def make[A]: Channel[A] = make(1) |
alias server='open http://localhost:8000 && python -m SimpleHTTPServer' |
package controllers | |
// import play.api._ | |
import play.api.mvc._ | |
object Application extends Controller { | |
def index: Action[_] = Action { |
# Upstart script for a play application that binds to an unprivileged user. | |
# put this into a file like /etc/init/play.conf | |
# | |
# This could be the foundation for pushing play apps to the server using something like git-deploy | |
# By calling service play stop in the restart command and play-start in the restart command. | |
# | |
# Usage: | |
# start play | |
# stop play | |
# restart play |
@mixin arrow-box($direction, $color, $size) | |
&:after, &:before | |
@if $direction == top | |
bottom: 100% | |
@if $direction == bottom | |
top: 100% | |
@if $direction == left | |
right: 100% | |
@if $direction == right | |
left: 100% |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
import java.lang.Character.{ LETTER_NUMBER => CR,LINE_SEPARATOR => LF } | |
import java.net.InetSocketAddress | |
import java.nio.channels.AsynchronousChannelGroup._ | |
import java.nio.channels.AsynchronousServerSocketChannel._ | |
import java.nio.channels.{ AsynchronousSocketChannel => ASC } | |
import java.nio.channels.CompletionHandler | |
import java.nio.ByteBuffer._ | |
import java.util.concurrent.Executors._ | |
import scala.annotation.implicitNotFound | |
import scala.collection.mutable.ListBuffer |
web: target/start -Dhttp.port=${PORT} -Dconfig.resource=prod.conf ${JAVA_OPTS} |
case class ZeeingEvent( | |
zid: String, | |
kind: String, | |
showId: String, | |
show_name: Option[String], | |
time: DateTime | |
) { | |
require (kind == "StartedZeeing" || kind == "EndedZeeing") | |
} |