Skip to content

Instantly share code, notes, and snippets.

module.exports = function (eleventyConfig) {
eleventyConfig.addPassthroughCopy("images");
eleventyConfig.addPassthroughCopy("admin");
eleventyConfig.addPassthroughCopy("CSS");
eleventyConfig.addPassthroughCopy("Javascript");
eleventyConfig.addWatchTarget("images");
eleventyConfig.addWatchTarget("admin");
eleventyConfig.addWatchTarget("CSS");
eleventyConfig.addWatchTarget("Javascript");
@Aankhen
Aankhen / ContinuationsExample.scala
Created April 9, 2012 15:31 — forked from raymondtay/gist:2289042
Interactive Input
import scala.util.continuations._
// might need to be compiled and run separately due to a bug in App
object ContinuationsExample extends App {
def prompt(display: String): Boolean = {
print(display + " (Y/N) ")
Console.readLine.trim.headOption match {
case Some('Y') | Some('y') => true
case Some('N') | Some('n') => false
@Aankhen
Aankhen / abc.scala
Created February 10, 2012 08:03 — forked from sheki/abc.scala
func() = {
def rec(i: Int, acc: List[Array[Byte]]) {
if (i == 0)
acc
else
channel.basicGet(queueName, true) match {
case x: GetResponse => rec(i - 1, x.getBody +: acc)
case _ => acc
}
}
@Aankhen
Aankhen / abc.scala
Created February 10, 2012 07:31 — forked from sheki/abc.scala
func() = {
Stream.range(0, noItems) map {
_ => channel.basicGet(queueName, true) match {
case x: GetResponse => Some(x.getBody)
case _ => None
}
} takeWhile (_.isDefined) toList
}