Skip to content

Instantly share code, notes, and snippets.

View ravitri's full-sized avatar
🎯
Focusing

Ravi Trivedi ravitri

🎯
Focusing
View GitHub Profile
@ravitri
ravitri / git.txt
Last active January 5, 2021 06:00
Git Stuff
## To grep for a string in all branches
1. git branch -a | tr -d \* | grep -v master | xargs git grep etcdHighFsyncDurations
2. git grep -i etcdBackendQuotaLowSpace $(git for-each-ref --format='%(refname)' refs/remotes) | awk -F":" '{ print $1 }' | sort -nr | uniq
## To check which all branches a commit ID is present
git branch -a --contains $COMMIT_ID
## To get all commits for a single file
git log --oneline --decorate --follow -- Documentation/etcd-mixin/mixin.libsonnet
@ravitri
ravitri / etcd-local-goreman.md
Created December 28, 2020 20:51
etcd local cluster - goreman
@ravitri
ravitri / install-etcd.sh
Created December 28, 2020 20:44
Install etcd binary in local path
#!/bin/bash
ETCD_VER=v3.4.14
# choose either URL
#GOOGLE_URL=https://storage.googleapis.com/etcd
GITHUB_URL=https://github.com/etcd-io/etcd/releases/download
DOWNLOAD_URL=${GITHUB_URL}
rm -f etcd-${ETCD_VER}-linux-amd64.tar.gz
1. OCP 3 Draft - https://github.com/openshift/openshift-pep/blob/master/openshift-pep-013-openshift-3.md
@ravitri
ravitri / intensify.sh
Created June 2, 2020 05:21 — forked from alisdair/intensify.sh
intensifies Slack emoji creator
#!/bin/bash
# Generate a `:something-intensifies:` Slack emoji, given a reasonable image
# input. I recommend grabbing an emoji from https://emojipedia.org/
set -euo pipefail
# Number of frames of shaking
count=10
# Max pixels to move while shaking