I hereby claim:
- I am fernandomora on github.
- I am fernandomora (https://keybase.io/fernandomora) on keybase.
- I have a public key ASDHsShMVZBYpBVEZpGPHFEpP5FJ5ZVE7WPrIfx4Q8QHbwo
To claim this, I am signing this object:
| \setenv LESS '-iMSx4FXRe' | |
| \pset pager always | |
| \pset null ¤ | |
| \pset linestyle unicode | |
| \pset border 2 | |
| -- Returns query time cost with each order | |
| \timing | |
| -- Returns more information on errors |
| def square[Element, IT[_] <: Iterable[Element], That](it: IT[Element]) | |
| (implicit bf: CanBuildFrom[IT[Element], Element, That], | |
| num: Numeric[Element]): That = { | |
| val b = bf.apply(it) | |
| b.sizeHint(it) | |
| it.foreach(elem => b += num.times(elem,elem) ) | |
| b.result() | |
| } |
| import scala.language.higherKinds | |
| def sequence[A, M[X] <: TraversableOnce[X]](in: M[Monad[A]])(implicit cbf: CanBuildFrom[M[Monad[A]], A, M[A]]): Monad[M[A]] = { | |
| val unit = Monad(cbf(in)) | |
| in.foldLeft(unit){ | |
| (mba, ma) => for (ba <- mba; a <- ma) yield ba += a | |
| }.map(_.result()) | |
| } |
| SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(buildTrustAllSSLContext(), NoopHostnameVerifier.INSTANCE); | |
| Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder.<ConnectionSocketFactory>create().register("http", PlainConnectionSocketFactory.getSocketFactory()).register("https", sslsf).build(); | |
| HttpClientConnectionManager cm = new PoolingHttpClientConnectionManager(new DefaultHttpClientConnectionOperator(socketFactoryRegistry, null, null), null, -1, TimeUnit.MILLISECONDS); | |
| HttpClientBuilder clientBuilder = HttpClients.custom(); | |
| clientBuilder.setConnectionManager(cm); | |
| class SniHttpClientConnectionOperator extends DefaultHttpClientConnectionOperator { | |
| class SniSSLSocketFactory extends SSLConnectionSocketFactory { |
| import com.github.xiaodongw.swagger.finatra.{SwaggerSupport, SwaggerSupportBase} | |
| import com.twitter.finagle.Filter | |
| import com.twitter.finagle.http.{Request, Response} | |
| import com.twitter.finatra.http.Controller | |
| import io.swagger.models.Swagger | |
| import io.swagger.models.Operation | |
| trait SwaggerFilterSupport extends SwaggerSupport { self: Controller => | |
| override protected implicit val swagger: Swagger |
| #!/usr/bin/env bash | |
| read -e -s -p 'Password: ' password | |
| echo $password |
| #!/usr/bin/env bash | |
| # check color support | |
| colors=$(tput colors) | |
| if (($colors >= 8)); then | |
| red='\033[0;31m' | |
| nocolor='\033[00m' | |
| else | |
| red= | |
| nocolor= |
I hereby claim:
To claim this, I am signing this object:
| 04523be71ff5c62fe068b27465ea3d3967803755a4a2656d2aa7c55cd8b21636ecb2bd44aa42b5a071c99e1f744adbff04d8cba00ff2265bbb8bb89320b3e8d875;GMadorell |