Skip to content

Instantly share code, notes, and snippets.

View nsuthison's full-sized avatar
🤔

Natechawin Suthison nsuthison

🤔
  • Ava Advisor
  • Bangkok
View GitHub Profile
@nsuthison
nsuthison / Consumer.scala
Last active February 24, 2020 17:59 — forked from ElisaBaum/Consumer.scala
Kafka Producer/Consumer Example in Scala (Revision to update deprecate/outdate kafka/scala version)
import java.util.Properties
import java.time.Duration
import scala.jdk.CollectionConverters._
import org.apache.kafka.clients.consumer.{
ConsumerConfig,
ConsumerRecords,
KafkaConsumer
}
import org.apache.kafka.common.serialization.StringDeserializer
@nsuthison
nsuthison / .gitignore
Created February 24, 2020 19:03
gitignore for scala project
*.class
*.log
# sbt specific
.bloop/
.cache/
.history/
.lib/
dist/*
target/
@nsuthison
nsuthison / find-missing-tldr.bash
Created October 24, 2020 10:45
find-missing-tldr.bash
for cmd in $(bash -c 'compgen -c | sort');
do echo $cmd "=>" $(tldr $cmd);
done;
@nsuthison
nsuthison / curl-https-ph
Last active November 6, 2020 09:03
log from curl -v https://p**rnhub.com
* Trying 66.254.114.41...
* TCP_NODELAY set
* Connected to pornhub.com (66.254.114.41) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
@nsuthison
nsuthison / remove-git-history.sh
Last active February 3, 2021 22:15
Remove sensitive data from git history
# Ref: https://docs.github.com/en/github/authenticating-to-github/removing-sensitive-data-from-a-repository
# note: use file not path
bfg --delete-files {YOUR-FILE-WITH-SENSITIVE-DATA}
git push --force