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
group :test do | |
gem "roda" | |
end |
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 scala.concurrent.{ExecutionContext, Future} | |
import spray.routing.{AuthenticationFailedRejection, RequestContext} | |
import spray.routing.authentication.{Authentication, ContextAuthenticator} | |
/** Token based authentication for Spray Routing. | |
* | |
* Extracts an API key from the header or querystring and authenticates requests. | |
* | |
* TokenAuthenticator[T] takes arguments for the named header/query string containing the API key and | |
* an authenticator that returns an Option[T]. If None is returned from the authenticator, the request |
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
#!/bin/bash | |
# | |
# nook-sync | |
# TODO: Remove hard-coded (mac-specific) device mount dir. | |
# TODO: Provide option for 2-way syncing | |
# TODO: Provide option to delete files on device that aren't in sync dir | |
function usage { | |
cat << EOF |