I hereby claim:
- I am johnnywey on github.
- I am johnnywey (https://keybase.io/johnnywey) on keybase.
- I have a public key whose fingerprint is F1F1 66AF 72B7 35A9 9357 9D32 61EA A6B0 ECD0 4B0E
To claim this, I am signing this object:
{"version":1,"resource":"vscode-remote://dev.johnnywey.com/Users/johnnywey/code/go/learning_go/grpc-go/internal/grpctest/example_test.go","entries":[{"id":"feZZ.go","timestamp":1656645683309},{"id":"rkLT.go","timestamp":1656646334568}]} |
I hereby claim:
To claim this, I am signing this object:
import com.itextpdf.text.* | |
import com.itextpdf.text.pdf.* | |
@Grab(group='com.itextpdf', module='itextpdf', version='5.5.0') | |
@Grab(group='org.bouncycastle', module='bcpkix-jdk15on', version='1.49') | |
class AddBackgroundColorToPdf { | |
static def createPdfFromImageFile(String fileName) { | |
def input = new FileInputStream(fileName) |
// Groovy's JsonOutput is using a static SimpleDateFormat. This is not threadsafe. | |
import java.text.SimpleDateFormat | |
import java.util.concurrent.LinkedBlockingQueue | |
import java.util.concurrent.ThreadPoolExecutor | |
import java.util.concurrent.TimeUnit | |
ThreadPoolExecutor executor = new ThreadPoolExecutor(4, 4, 500, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(1000)) | |
1000.times {executor.execute(new KillJsonOutput())} | |
while (true) { |
#!/bin/bash | |
# Based on work by Tiago Rodrigues | |
# Here: http://trodrigues.net/presentations/buster-ci/#/24 | |
# And here: https://gist.github.com/2630210 | |
# Usage: | |
# env BUSTER_HOME=/where/you/installed/buster ./buster-server.sh start|stop | |
function buster_server_pid(){ | |
echo `ps aux|grep buster-server|grep node|awk '{ print $2 }'` |
/* | |
* HTTPBuilder uses HttpClient and does not automatically follow HTTP 302 responses from a POST as per the HTTP spec. You can modify this | |
* behavior by overriding updating the default behavior to follow regardless of initiating method. | |
*/ | |
def http = new HTTPBuilder("http://UrlThatExpectsAPostAndReturnsA302.com") | |
http.client.setRedirectStrategy(new DefaultRedirectStrategy() { | |
@Override | |
boolean isRedirected(HttpRequest request, HttpResponse response, HttpContext context) { | |
def redirected = super.isRedirected(request, response, context) |