Skip to content

Instantly share code, notes, and snippets.

View ashawley's full-sized avatar
✍️
Artwork by Arthur Baelde, Wikimedia Commons

Aaron S. Hawley ashawley

✍️
Artwork by Arthur Baelde, Wikimedia Commons
View GitHub Profile
/**
* NegNumbers
*
* A singleton that takes the code out for a spin.
*/
object NegNumbers {
// Instance:
val some = new SomeNumbers {
// Defining an abstract member is what instances do best!
@ashawley
ashawley / Main.scala
Created May 25, 2016 17:47
runMany: repeat runMain task in SBT
package proj
object Main extends App
def runSecondThenFirst(first: => Unit)(second: => Unit) = {
second;
first
}
runSecondThenFirst {
println("First")
} {
println("Second")
}
@ashawley
ashawley / gist:5058193
Created February 28, 2013 16:56
Whitespace problems, I feel bad for you son.
;; Billy Mays here talking about zap to whitespace.
;; Deletes your whitespace forward.
;; Got to fix indentation before you merge? No problem!
(global-set-key "\C-c " 'zap-whitespace-forward) ;; C-c SPC
;; But I'm still not done.
(defalias 'zap-whitespace-forward 'ash-delete-syntax-forward)
;; There's more!
;; Delete word characters forward, delete punctuation forward,