Skip to content

Instantly share code, notes, and snippets.

View KatelynHaworth's full-sized avatar

Katelyn Haworth KatelynHaworth

View GitHub Profile
@KatelynHaworth
KatelynHaworth / CrateObject.scala
Last active August 29, 2015 14:24
A simple yet powerful helper class to provide the most simplistic way to create & drop tables and insert & select data based on scala case classes in Crate DB (https://crate.io) | Requires the Crate Java Client (https://bintray.com/crate/crate/crate-client/view)
import java.io.IOException
import io.crate.client.CrateClient
/**
* CrateObject supplies methods
* for objects to store them in
* a Crate Database
*
* @author Liam Haworth
* @version 1.0
@andrewrcollins
andrewrcollins / trim.awk
Created January 11, 2012 04:22
ltrim(), rtrim(), and trim() in awk
function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s }
function rtrim(s) { sub(/[ \t\r\n]+$/, "", s); return s }
function trim(s) { return rtrim(ltrim(s)); }
BEGIN {
# whatever
}
{
# whatever
}
END {