Skip to content

Instantly share code, notes, and snippets.

Avatar

James Hughes kouphax

View GitHub Profile
View Test.java
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;
View hmmmm.scala
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
View .tmux.conf
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
View Confirm.elm
module Confirm where
import Html exposing (..)
import Html.Events exposing (..)
import Signal exposing (..)
type Action = NoOp | Prompt
actions : Signal.Mailbox Action
actions =
View Confirm.elm
module Confirm where
import Html exposing (..)
import Html.Events exposing (..)
import Html.Attributes exposing (..)
import Signal exposing (..)
import StartApp
port getName : Signal String
View README.md

Just James things

View gist:bc1f734514fce7f142c2
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 Feb 16, 2015
How to write a basic test in Wake
View MyFirstTest.wk
import Asserts;
@TestClass
every MyFirstTest is:
@Test
itIsWhatItIs(Asserts) {
var Text = "test";
Asserts.that(Text)Equals("test");
}
@kouphax
kouphax / gource.sh
Last active Aug 29, 2015
Gource Mashup
View gource.sh
#! /bin/bash
function clear {
rm *.log-r *.log 2> /dev/null
}
clear
REPOS=$(find . -maxdepth 1 -mindepth 1 -type d)