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
c_cyan=`tput setaf 6` | |
c_red=`tput setaf 1` | |
c_green=`tput setaf 2` | |
c_sgr0=`tput sgr0` | |
parse_git_branch () | |
{ | |
if git rev-parse --git-dir >/dev/null 2>&1 | |
then | |
git_status="$(git status 2> /dev/null)" |
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
get { HttpClient httpClient -> | |
def result = httpClient.request("http://beckje01.com", { RequestSpec requestSpec -> | |
requestSpec.body.type("text/plain").stream { it << request.body.text } | |
requestSpec.method(request.method.toString()) | |
request.headers.getNames().each { | |
requestSpec.headers.set(it, request.headers.get(it)) | |
} | |
}) | |
result.onError({ |
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
@Grab('io.ratpack:ratpack-groovy:0.9.6') | |
import ratpack.registry.RegistrySpec | |
import static ratpack.groovy.Groovy.* | |
import static ratpack.registry.Registries.registry | |
ratpack { | |
handlers { | |
handler { |
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 org.apache.log4j.MDC | |
class LoggingFilters { | |
public static final String CORRELATION_HEADER = "X-CorrelationId" //Our Standard | |
def filters = { | |
correlationId(controller: '*', action: '*') { //For all requests | |
before = { | |
String correlationId = request.getHeader(CORRELATION_HEADER) |
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
### Keybase proof | |
I hereby claim: | |
* I am beckje01 on github. | |
* I am beckje01 (https://keybase.io/beckje01) on keybase. | |
* I have a public key whose fingerprint is 857D 6372 9EA4 7492 4FB7 D95A C3C2 391B B016 F80A | |
To claim this, I am signing this object: |
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 io.vertx.core.http.HttpHeaders | |
import io.vertx.core.http.HttpServerRequest | |
import io.vertx.core.json.JsonObject | |
import io.vertx.ext.apex.RoutingContext | |
import io.vertx.ext.apex.handler.impl.AuthHandlerImpl | |
import io.vertx.ext.auth.AuthProvider; | |
class BearerAuthHandler extends AuthHandlerImpl { |
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
.ui-tabs .ui-tabs-hide { | |
position: absolute; | |
left: -10000px; | |
} |
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
if(window.navigator.standalone) | |
{//This page is currently standalone | |
console.log("stand alone"); | |
} | |
if(!("standalone" in window.navigator)) | |
{//This Page is shown in a browser that can't | |
console.log("can't do standalone"); | |
} |
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
/* | |
* dateUtils.js | |
* | |
* A simple set of utilites for dealing with dates | |
* | |
*/ | |
function toISOFormat(date) | |
{ |
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 mavenConfigFile = new File("${basedir}/grails-app/conf/mavenInfo.groovy") | |
if (mavenConfigFile.exists()) { | |
def slurpedMavenInfo = new ConfigSlurper().parse(mavenConfigFile.toURL()) | |
slurpedMavenInfo.grails.project.repos.each {k, v -> | |
println "Adding maven info for repo $k" | |
grails.project.repos."$k" = v | |
} | |
} | |
else { | |
println "No mavenInfo file found." |
OlderNewer