Skip to content

Instantly share code, notes, and snippets.

View jastice's full-sized avatar
🤗

Justin Kaeser jastice

🤗
View GitHub Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@jastice
jastice / click-to-stamp.elm
Created July 8, 2014 10:37
Click to stamp!
import Mouse
import Keyboard
import Window
{--
Click to stamp!
Keys:
3-9 stamp shape (corners)
r red stamp!
t green stamp!
object Attribute {
case class Attributed[Thing, Attribute](val thing: Thing, val attributes: Set[Attribute] = Set[Attribute]()) {
/** Add an attribute. */
def +(a: Attribute) = copy(attributes = attributes+a)
/** Change attributes for which the partial function is defined. */
def change(pf: PartialFunction[Attribute,Attribute]) =
def sleepForTimes(ms: Long, times: Long) = {
var n = 0
() => {
n+=1
if (n <= times) {
Thread.sleep(ms)
true
} else {
false
}
class IntegrationSuite extends FunSuite with ShouldMatchers {
test("infinit actor") {
val actor= ActorSystem("tail").actorOf(Props[MrActor])
Thread.sleep(10000)
actor ! Interrupt
Thread.sleep(40054)
}
class LineAggregator extends Actor {
var v = ""
override def receive = {
case Exit => context.stop(self)
case Put(line) => v = v + line + "\n"
case Get => sender ! v
}