Skip to content

Instantly share code, notes, and snippets.

View tamalsaha's full-sized avatar
🎢
Building. Learning. Improving.

Tamal Saha tamalsaha

🎢
Building. Learning. Improving.
View GitHub Profile
@tamalsaha
tamalsaha / ksh
Last active September 21, 2017 05:56
Kubectl exec with working terminal
#!/bin/sh
if [ "$1" = "" ]; then
echo "Usage: ksh <pod> [flags_to_kubectl]"
exit 1
fi
POD=$1
shift
COLUMNS=`tput cols`
@lefred
lefred / addition_to_sys.sql
Last active August 26, 2024 00:43
MySQL Group Replication extra functions and views to sys schema
USE sys;
DELIMITER $$
CREATE FUNCTION IFZERO(a INT, b INT)
RETURNS INT
DETERMINISTIC
RETURN IF(a = 0, b, a)$$
CREATE FUNCTION LOCATE2(needle TEXT(10000), haystack TEXT(10000), offset INT)
@alexanderdavidsen
alexanderdavidsen / guard.json
Created April 5, 2018 10:44
Sample Grafana dashboard for Guard using prometheus as a data source
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
@tamalsaha
tamalsaha / 01_pkcs12-cacerts-workaround.sh
Created June 22, 2018 08:19 — forked from mikaelhg/01_pkcs12-cacerts-workaround.sh
Workaround for java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
# Ubuntu 18.04 and various Docker images such as openjdk:9-jdk throw exceptions when
# Java applications use SSL and HTTPS, because Java 9 changed a file format, if you
# create that file from scratch, like Debian / Ubuntu do.
#
# Before applying, run your application with the Java command line parameter
# java -Djavax.net.ssl.trustStorePassword=changeit ...
# to verify that this workaround is relevant to your particular issue.
#
# The parameter by itself can be used as a workaround, as well.
@liangrog
liangrog / k8s-code-gen-tags
Last active March 6, 2025 13:44
kubernetes code generator tags
// +genclient - generate default client verb functions (create, update, delete, get, list, update, patch, watch and depending on the existence of .Status field in the type the client is generated for also updateStatus).
// +genclient:nonNamespaced - all verb functions are generated without namespace.
// +genclient:onlyVerbs=create,get - only listed verb functions will be generated.
// +genclient:skipVerbs=watch - all default client verb functions will be generated except watch verb.
// +genclient:noStatus - skip generation of updateStatus verb even thought the .Status field exists.
@tamalsaha
tamalsaha / git-split.sh
Last active May 25, 2019 22:35
Splitting a subfolder out into a new repository without changing project root directory
# If you want to change project root, follow
# https://help.github.com/en/articles/splitting-a-subfolder-out-into-a-new-repository
# More advanced stuff: https://manishearth.github.io/blog/2017/03/05/understanding-git-filter-branch/
# ---------------------------------------------------------------------------------------------------
## STEPS for Splitting a subfolder out into a new repository without changing project root directory
# clone the repo
@sub-mod
sub-mod / crc_remote_laptop.md
Last active July 9, 2022 12:03
Setup CodeReady Containers on Remote Server and connect from Laptop 4.2

Following steps work for F29 for F31 look here

On the remote host

cat /etc/redhat-release
Fedora release 29 (Twenty Nine)

Install packages