Skip to content

Instantly share code, notes, and snippets.

View s4nchez's full-sized avatar

Ivan Sanchez s4nchez

View GitHub Profile

Keybase proof

I hereby claim:

  • I am s4nchez on github.
  • I am s4nchez (https://keybase.io/s4nchez) on keybase.
  • I have a public key whose fingerprint is E4A1 E651 B032 71BD 49E8 D9BF BA72 A0C7 3ABA 533B

To claim this, I am signing this object:

@s4nchez
s4nchez / reword.sh
Created April 2, 2019 11:36
Reword multiple commits in git
git -c core.editor='sed -i -E "1s/SD-12259/SD-12891/"' \
-c sequence.editor='sed -i -E "s/^pick/reword/"' \
rebase -i f7f13c01cd4e3296618a9b1546b24c19d1b2a152~1
@s4nchez
s4nchez / undertow.kt
Created July 30, 2019 20:08
Configuring undertow with connection timeout
package org.http4k.server
import com.natpryce.hamkrest.assertion.assertThat
import com.natpryce.hamkrest.equalTo
import io.undertow.UndertowOptions
import io.undertow.server.handlers.BlockingHandler
import org.http4k.client.ApacheClient
import org.http4k.core.BodyMode
import org.http4k.core.HttpHandler
import org.http4k.core.Method
@s4nchez
s4nchez / Http4kClientExample.kt
Created October 29, 2023 09:00
Example of http4k server and client
import org.http4k.client.JavaHttpClient
import org.http4k.core.Method
import org.http4k.core.Request
import org.http4k.core.then
import org.http4k.filter.DebuggingFilters.PrintResponse
fun main() {
val client = JavaHttpClient()
val printingClient = PrintResponse().then(client)