This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --------------------------------------------------------------------------- | |
# | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Mouse | |
import Keyboard | |
import Window | |
{-- | |
Click to stamp! | |
Keys: | |
3-9 stamp shape (corners) | |
r red stamp! | |
t green stamp! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]) = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sleepForTimes(ms: Long, times: Long) = { | |
var n = 0 | |
() => { | |
n+=1 | |
if (n <= times) { | |
Thread.sleep(ms) | |
true | |
} else { | |
false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class IntegrationSuite extends FunSuite with ShouldMatchers { | |
test("infinit actor") { | |
val actor= ActorSystem("tail").actorOf(Props[MrActor]) | |
Thread.sleep(10000) | |
actor ! Interrupt | |
Thread.sleep(40054) | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
NewerOlder