I hereby claim:
- I am joseraya on github.
- I am joseraya (https://keybase.io/joseraya) on keybase.
- I have a public key whose fingerprint is 8D00 6D27 34A0 A548 9935 24CE 84A8 77EF 4614 3D0F
To claim this, I am signing this object:
import java.sql.ResultSet | |
object ResultSetReaders { | |
trait Reader[T] { | |
def fromResultSet(column: Int, rs: ResultSet): T | |
} | |
implicit val stringReader = new Reader[String] { | |
override def fromResultSet(column: Int, rs: ResultSet): String = { |
I hereby claim:
To claim this, I am signing this object:
package com.agilogy.spray.cors | |
import spray.http.{HttpMethods, HttpMethod, HttpResponse, AllOrigins} | |
import spray.http.HttpHeaders._ | |
import spray.http.HttpMethods._ | |
import spray.routing._ | |
// see also https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS | |
trait CORSSupport { | |
this: HttpService => |
var Q = require('q'); | |
function printNumber(n) { | |
return Q.fcall(function () { | |
console.log("Number: ", n); | |
return n; | |
}); | |
} | |
function printNumbers(numbers) { |
var Browser = require('zombie'), | |
url = require('url'), | |
fs = require('fs'), | |
$q = require('Q'), | |
saveDir = __dirname + '/_snapshots'; | |
var scriptTagRegex = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi; | |
var stripScriptTags = function(html) { |
In order to configure the bitbucket hook we need two things: The user's API Token and the project token. In order to retrieve the first one whe should click on our username (on the top right corner of the page), click on configure and then click on "Show API Token". This API token will be used as password for our user.
For the project's token we need to go to the job configuration (/job/{job-name}/configure), "build triggers" and enable "trigger remote builds" and, there, input some random text as token.
Once we have these two tokens we can go to bitbucket, repo administration, hooks section, and add a new jenkins hook that we will configure like:
import play.api.test.Helpers._ | |
import play.api.test._ | |
import play.api.mvc.Result | |
import play.api.libs.json.JsValue | |
import play.api.libs.json.Json | |
import play.api.GlobalSettings | |
import org.mockito.stubbing.OngoingStubbing | |
import scala.reflect.ClassTag | |
import org.specs2.mock.Mockito | |
import play.api.mvc.Call |
#!/bin/sh | |
check() { | |
chsum1=chsum2 | |
while [[ true ]] | |
do | |
chsum2=`find . -type f -exec md5 {} \;` | |
if [[ $chsum1 != $chsum2 ]] ; then | |
echo "Change detected ..." |
(ns encapsulation.core-test | |
(:use midje.sweet) | |
(:require [clj-time.core :as time])) | |
;My point here is to show how we can achieve encapsulation in clojure | |
;I assume that we may need encapsulation for two purposes: | |
; - Hide the internal representation of data (so that it can change) | |
; - Ensure the consistency of the data (by applying integrity constraints) | |
;Let's say that we have a "class" Person with an age. |
organization := "com.agilogy" | |
name := "<<whatever>>" | |
version := "0.0.1" | |
scalaVersion := "2.9.1" | |
libraryDependencies += "org.scalatest" %% "scalatest" % "1.7.1" % "test" |