This file contains hidden or 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
#!/bin/bash -e | |
export IGNORE_FILES=$(ls -p | grep -v /) | |
detect_changed_folders() { | |
if [[ "${DRONE_PULL_REQUEST}" ]]; then | |
folders=$(git --no-pager diff --name-only FETCH_HEAD FETCH_HEAD~1 | sort -u | awk 'BEGIN {FS="/"} {print $1}' | uniq); | |
else | |
folders=$(git --no-pager diff --name-only HEAD~1 | sort -u | awk 'BEGIN {FS="/"} {print $1}' | uniq); | |
fi | |
export changed_components=$folders |
This file contains hidden or 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
var R = require('ramda'); | |
var Future = require('ramda-fantasy').Future; | |
//Wrap ajax in a future | |
//:: String -> Future String | |
var fetch = function(url) { | |
return new Future(function(rej, res){ | |
var oReq = new XMLHttpRequest(); | |
oReq.addEventListener("load", res, false); | |
oReq.addEventListener("error", rej, false); | |
oReq.addEventListener("abort", rej, false); |
This file contains hidden or 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
public class Switch { | |
private Engine engine; | |
private boolean on; | |
public Switch(Engine engine) { | |
this.engine = engine; | |
this.on = false; | |
} | |
public boolean switchOn() { |
This file contains hidden or 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
:paste | |
import scalaz._, Scalaz._, scalaz.Free.{Suspend, Return} | |
// Console grammar | |
sealed trait ConsoleF[+A] | |
object Console { | |
case class WriteLine[A](msg: String, o: A) extends ConsoleF[A] | |
case class ReadLine[A](o: String => A) extends ConsoleF[A] | |
} |
This file contains hidden or 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
package auth | |
import unfiltered.Cycle | |
import unfiltered.request.{HttpRequest, BasicAuth, Path} | |
import unfiltered.response._ | |
import unfiltered.jetty.Http | |
import unfiltered.filter.Plan | |
object Req { | |
def apply[Req, Res](f:PartialFunction[HttpRequest[Req], HttpRequest[Req] => ResponseFunction[Res]]):Cycle.Intent[Req, Res] = { |
This file contains hidden or 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
package akka.unfiltered | |
import akka.actor._ | |
import akka.dispatch.Future | |
import akka.pattern.ask | |
import akka.util.duration._ | |
import akka.util.Timeout | |
import unfiltered.Async | |
import unfiltered.request._ |
This file contains hidden or 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
// module dependencies | |
var http = require('http'), | |
url = require('url'); | |
/** | |
* UrlReq - Wraps the http.request function making it nice for unit testing APIs. | |
* | |
* @param {string} reqUrl The required url in any form | |
* @param {object} options An options object (this is optional) |
This file contains hidden or 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
/*! | |
* Small Walker - v0.1.1 - 5/5/2011 | |
* http://benalman.com/ | |
* | |
* Copyright (c) 2011 "Cowboy" Ben Alman | |
* Dual licensed under the MIT and GPL licenses. | |
* http://benalman.com/about/license/ | |
*/ | |
// Walk the DOM, depth-first (HTML order). Inside the callback, `this` is the |
NewerOlder