Skip to content

Instantly share code, notes, and snippets.

View kouphax's full-sized avatar

James Hughes kouphax

View GitHub Profile
package parsers;
import com.fasterxml.jackson.databind.JsonNode;
import helpers.Assertions;
import org.junit.Test;
import play.http.HttpErrorHandler;
import play.libs.F;
import play.mvc.BodyParser;
import play.mvc.Http;
import play.mvc.Result;
sealed trait Shape
case class Rectangle(width: Float, length: Float) extends Shape
case class Circle(radius: Float) extends Shape
case class Prism(width: Tuple2[Float, Float], height: Float) extends Shape
val rect : Shape = Rectangle(1.3f, 10f)
def getShapeHeight(shape: Shape): Float = shape match {
case Rectangle(_,h) => h
set-window-option -g mode-keys vi
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-window-option -g mode-mouse on
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Use vim keybindings in copy mode
setw -g mode-keys vi
module Confirm where
import Html exposing (..)
import Html.Events exposing (..)
import Signal exposing (..)
type Action = NoOp | Prompt
actions : Signal.Mailbox Action
actions =
module Confirm where
import Html exposing (..)
import Html.Events exposing (..)
import Html.Attributes exposing (..)
import Signal exposing (..)
import StartApp
port getName : Signal String
@kouphax
kouphax / README.md
Last active August 29, 2015 14:19 — forked from mbostock/.block

Just James things

function draw() {
local divider_row=''
local divider_char='-'
for i in `seq 1 $COLUMNS`; do
divider_row=$divider_row$divider_char
done
echo $divider_row
}
@kouphax
kouphax / MyFirstTest.wk
Created February 16, 2015 09:04
How to write a basic test in Wake
import Asserts;
@TestClass
every MyFirstTest is:
@Test
itIsWhatItIs(Asserts) {
var Text = "test";
Asserts.that(Text)Equals("test");
}
:map <leader>x :w<CR>:!./%<CR>
@kouphax
kouphax / gource.sh
Last active August 29, 2015 14:09
Gource Mashup
#! /bin/bash
function clear {
rm *.log-r *.log 2> /dev/null
}
clear
REPOS=$(find . -maxdepth 1 -mindepth 1 -type d)