Skip to content

Instantly share code, notes, and snippets.

View mm1705's full-sized avatar
:octocat:
Searching

Mohit Mittal mm1705

:octocat:
Searching
View GitHub Profile
curl -X GET <endpoint:9200>/_cluster/settings?pretty
curl -X GET <endpoint:9200>/_cluster/settings?include_defaults=true&flat_settings=true
curl -X GET <vpc-endpoint>/_nodes/stats
curl -X GET <endpoint:9200>/_cat/indices
curl -X GET <endpoint:9200>/_cat/shards
curl -X GET <vpc-endpoint>/_cat/shards/<index-name>
curl -X GET <endpoint:9200>/<index_name>?pretty
control + left/right arrow keys -> move start/end of line
option + command + esc -> force quit dialogue
open `pwd` -> open current directory in terminal in finder
bloomrpc:
collect all proto paths via this command - `find $(pwd) -type d | grep -v -e "git\|node_modules\|idea" | awk '{printf "\"%s\",\n", $0 }' | sort -r | sed '$ s/.$//' | pbcopy`
brew install graphviz
curl --location --request GET '<uri>/debug/pprof/heap' > pprofHeap.out
go tool pprof -http=':8081' pprofHeap.out
@mm1705
mm1705 / quick-reference.md
Last active August 8, 2020 15:21
Some important websites for quick reference
@mm1705
mm1705 / git-cheatsheet.md
Last active May 27, 2020 19:58
Git cheatsheet

Clone a repo

There are two ways to clone a repository:

  • From terminal: git clone https://github.com/<user>/<repo-name>.git
  • From Github: Click on Fork button on Top-Right corner of the repository you'd like to clone

List all branches

git branch -a

Create new branch in bash

git branch -b [branch-name]

@mm1705
mm1705 / markdown-cheatsheet.md
Last active May 27, 2020 19:38
Markdown cheatsheet

Headings

#Heading1

Prefix: # + [Space]

##Heading2

Prefix: ## + [Space]

###Heading3

Prefix: ### + [Space]

####Heading4

Prefix: #### + [Space]

@mm1705
mm1705 / .vimrc
Last active May 29, 2020 17:05
.vimrc file, vim-cheatsheet
" source /etc/vimrc
set number
set ic
set wrap
set autoindent
set copyindent " copy the prev indentation on autoindenting
set showcmd
set nocursorline
set wildmenu