Posts in 2021
January 16, 2021 in Security
How to verify ECDSA signature generated by kotlin and verify it in Go?
Introduction Elliptic Curve Digital Signature Algorithm (ECDSA) offers a variant of the Digital Signature Algorithm (DSA) which uses elliptic curve cryptography. ECDSA keys and signatures are shorter than in RSA for the same security level. A 256-bit …
Posts in 2020
December 13, 2020 in Security
Use OpenSSL command line to test TLS server connectivity, check server certificate.
Introduction openssl s_client is a SSL/TLS client program can be used to test TLS server connectivity, check server certificate. usage: s_client args -4 - Force IPv4 -6 - Force IPv6 -host host - use -connect instead -port port - use -connect instead …
June 03, 2020 in Rails
Find 3rd party gems global variables in ruby
Why Need Find Global Variables In rails, if you want to use puma as rails server, you need make sure your app is thread safe, not only your app code itself, also 3rd party gems should also thread safe. One of requirement for thread safe is avoid …
April 15, 2020 in Splunk
NOTin Splunk search.
When you want to exclude results from your search you can use the NOT operator or the != field expression. However there is a significant difference in the results that are returned from these two methods. != vs. NOT Comparison Both!= field …
April 12, 2020 in Splunk
Step by step install Splunk, Splunk Forwarder, Splunk app free trial version on Linux.
Install Splunk Download from https://www.splunk.com/en_us/download/splunk-enterprise Download Splunk 8 via Command Line (wget): # .deb For Debian and Ubuntu $ wget -O splunk-8.0.3-a6754d8441bf-linux-2.6-amd64.deb …
April 10, 2020 in Azure
In Azure app service, I want to change the keep-alive time period and want to change the HTTP ping (keep-alive) URL to
/status, the default keep-alive URL is
Issues Description In Azure app service, I want to change the keep-alive time period and want to change the HTTP ping (keep-alive) URL to /status, the default is /. Answer from Azure support I can not find proper answer so send request to Azure …
March 13, 2020 in Go
demonstrates the development of a simple Go package inside a module and introduces the go tool, the standard way to fetch, build, and install Go modules, packages, and commands.
Code organization Go programs are organized into packages. A package is a collection of source files in the same directory that are compiled together. Functions, types, variables, and constants defined in one source file are visible to all other …
March 12, 2020 in Docker
Inside Docker container, want to connect service on localhost of host machine. There is a magic hostname
host.docker.internalcan be used inside Docker container to reach localhost of host machine.
Problem I have redis running in localhost, when I run a docker VM, I want to connect redis from inside of Docker VM, so I do not need docker-compose for another redis VM. Solution Docker for Mac: use host.docker.internal For Docker on Mac, there is a …
March 11, 2020 in Raspberry Pi
Install docker on Raspberry Pi and and configure to run as non-root.
Why docker A docker container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. A Docker container image is a lightweight, standalone, …
March 10, 2020 in Rails
Rails Logger can be custom to have multiple loggers through extend(). Azure application insights can collect app's log through trace. In this article creates a custom Rails logger and send a copy of log to Azure application insights.
Rails Logger interface Logger The Ruby Logger class provides a simple but sophisticated logging utility that you can use to output messages. Log level Logger level define as Severity. class Logger # Logging severity. # # DEBUG < INFO < WARN …