Skip to content

Instantly share code, notes, and snippets.

View karthick-kk's full-sized avatar
💣
Diffusing

karthick-kk

💣
Diffusing
View GitHub Profile
@karthick-kk
karthick-kk / bash_menu.sh
Created July 17, 2024 10:23 — forked from gagregrog/bash_menu.sh
Ephemeral Interactive Bash Menu with Up/Down selection or numeral selection
# Original solution sourced from:
# https://unix.stackexchange.com/questions/146570/arrow-key-enter-menu
#
# Updated to do the following:
# - Display index with each option
# - Choose options 1-9 with numeric input
# - Clear the menu and reset the cursor when an option is selected
#
# Arguments:
# array of options
@karthick-kk
karthick-kk / lineage-signing-builds.md
Created July 7, 2024 05:39 — forked from A2L5E0X1/lineage-signing-builds.md
Signing LineageOS builds with your own dev-keys

Generating dev-keys to sign android builds

All you need is an Android buildsystem (LineageOS is recommended)
NOTE: For Lineage 21 and newer, different steps are required.

PART 1: GENERATING KEYS

  1. Export your infos (replace examples with your infos)
subject='/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com'

C: Country shortform

@karthick-kk
karthick-kk / Boundary Installation
Last active December 13, 2023 09:04 — forked from smilelikeshit/install
install boundary hashicorp ubuntu 20.04
// Add the HashiCorp GPG key.
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
// Add the official HashiCorp Linux repository.
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
// Update and install.
sudo apt-get update && sudo apt-get install boundary
# Source: https://gist.github.com/38fe5617f9c38125f0213d442d9ab4c9
#############################################################
# How To Secure Kubernetes Clusters With Kubescape And Armo #
# https://youtu.be/ZATGiDIDBQk #
#############################################################
# Additional Info:
# - Kubescape: https://hub.armo.cloud
@karthick-kk
karthick-kk / install-golang-apt-get.sh
Created December 22, 2021 17:38 — forked from Adron/install-golang-apt-get.sh
Installing golang via apt-get
sudo add-apt-repository ppa:ubuntu-lxc/lxd-stable
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install golang
# Usually this is good to install golang, but alas the apt-get repo is usually out of sync with the latest.
@karthick-kk
karthick-kk / git-clearHistory
Created November 28, 2021 18:01 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@karthick-kk
karthick-kk / android-backup-apk-and-datas.md
Created January 15, 2021 15:28 — forked from AnatomicJC/android-backup-apk-and-datas.md
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Fetch application APK

To get the list of your installed applications:

@karthick-kk
karthick-kk / repo-reset.md
Created October 19, 2020 15:24 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@karthick-kk
karthick-kk / describe_instances.py
Created October 28, 2019 10:54 — forked from jeffbrl/describe_instances.py
How to make datetime.datetime json serializable - boto3 ec2 describe_instances
# Adapted from https://stackoverflow.com/questions/35869985/datetime-datetime-is-not-json-serializable
import datetime
import json
import boto3
def datetime_handler(x):
if isinstance(x, datetime.datetime):
return x.isoformat()