Skip to content

Instantly share code, notes, and snippets.

View arush-sal's full-sized avatar
🏍️
riding

Arush Salil arush-sal

🏍️
riding
View GitHub Profile

Keybase proof

I hereby claim:

  • I am arush-sal on github.
  • I am salil (https://keybase.io/salil) on keybase.
  • I have a public key ASDGilU2l3TYo_m5DU0yQjz5yxw_VSv8y5xF-q3t6IJp7go

To claim this, I am signing this object:

@arush-sal
arush-sal / notify.yml
Created October 6, 2022 08:47 — forked from trung/notify.yml
Notify slack about Github Actions workflow and its jobs status. `notify` job must be the last job in the workflow and it must depend on all other jobs
notify:
if: always()
name: Notify
needs:
- job1
- job2
- job11
- job3
- job4
runs-on: ubuntu-latest
@arush-sal
arush-sal / gist:801a2486036dfdb558f899d4ba2af72c
Created December 14, 2021 09:15
IPv4 Socket Address Regex
def is_ipv4_socket_address(network):
return re.match(r"^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]):([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$",network)
# this config file contains all config fields with comments
# NOTE: this is not a particularly useful config file
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
# patch the generated kubeadm config with some extra settings
kubeadmConfigPatches:
- |
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
evictionHard:
@arush-sal
arush-sal / zsh default compinstall
Created July 6, 2020 11:37
zsh default compinstall
# Set up the prompt
autoload -Uz promptinit
promptinit
prompt adam1
setopt histignorealldups sharehistory
# Use emacs keybindings even if our EDITOR is set to vi
bindkey -e
@arush-sal
arush-sal / metric-server-v3.6.0
Created July 1, 2020 02:35
metric-server-v3.6.0
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: system:aggregated-metrics-reader
labels:
rbac.authorization.k8s.io/aggregate-to-view: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
@arush-sal
arush-sal / bash.generate.random.alphanumeric.string.sh
Last active June 3, 2021 01:21 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"profiles":
@arush-sal
arush-sal / main.go
Created February 28, 2020 10:06
Simple Gorilla Mux HTTP server with each request logged in Go lang
package main
import (
"fmt"
"log"
"net/http"
"net/http/httptest"
"net/http/httputil"
"github.com/gorilla/mux"
@arush-sal
arush-sal / create-kube-user.sh
Created September 9, 2019 09:53 — forked from henning/create-kube-user.sh
create k8s user, certificate, permissions and client config
#!/bin/bash
CLUSTERNAME=mycluster.mydomain
NAMESPACE=default
USERNAME=myclusteruser
GROUPNAME=mygroup
openssl genrsa -out ${USERNAME}.key 2048
CSR_FILE=$USERNAME.csr