Skip to content

Instantly share code, notes, and snippets.

View crypticmind's full-sized avatar
BUSY

Carlos Ferreyra crypticmind

BUSY
  • Buenos Aires, Argentina
View GitHub Profile
@crypticmind
crypticmind / README.md
Last active March 25, 2024 06:26
Setup lambda + API Gateway using localstack
@crypticmind
crypticmind / db.cnf
Last active May 2, 2016 03:00
Read from MySQL (cmd. line), combine with HTTP JSON data (w/caching), output via template
[client]
host=localhost
database=test_report
user=test_report
password=test_report
@crypticmind
crypticmind / Mocks.scala
Last active July 6, 2016 15:14
Mockito Syntactic Sugar for Scala
package misc
import org.mockito.MockSettings
import org.mockito.Mockito.{mock => mockitoMock}
import org.mockito.invocation.InvocationOnMock
import org.mockito.stubbing.Answer
import org.mockito.verification.VerificationMode
import scala.reflect.{Manifest, ClassTag}
@crypticmind
crypticmind / CustomNameService.scala
Last active June 25, 2018 14:06
This is a custom name service for the JVM so you can add your own entries during testing of a web service/app.
package misc
import java.net.{InetAddress, UnknownHostException}
import java.util.concurrent.ConcurrentHashMap
import sun.net.spi.nameservice.{NameService, NameServiceDescriptor}
class CustomNameService extends NameService {
override def lookupAllHostAddr(s: String): Array[InetAddress] =
@crypticmind
crypticmind / ApplyChanges.scala
Last active August 29, 2015 14:06
JSON lenses - Get/Set JsValues, copy immutable objects
package tests
import spray.json._
object ApplyChanges extends App {
case class Area(country: String)
case class Address(street: String, city: String, area: Area)