Skip to content

Instantly share code, notes, and snippets.

View acharyab15's full-sized avatar

Bipeen Acharya acharyab15

View GitHub Profile
@acharyab15
acharyab15 / kubectl.md
Last active October 9, 2020 18:09
Kubernetes cheat sheet

Updating resources

Rolling update "www" containers of "frontend" deployment, updating the image:
kubectl set image deployment/frontend www=image:v2

Check the history of deployments including the revision:
kubectl rollout history deployment/frontend

Rollback to the previous deployment:
kubectl rollout undo deployment/frontend

@acharyab15
acharyab15 / keybase.md
Created August 21, 2020 05:36
Keybase

Keybase proof

I hereby claim:

  • I am acharyab15 on github.
  • I am acharyab (https://keybase.io/acharyab) on keybase.
  • I have a public key ASCgf6vCtQD1Gz0q51q5cGpm6K9JYOrM2-Vjw0Xo5r9Vuwo

To claim this, I am signing this object:

@acharyab15
acharyab15 / Misc.md
Last active October 9, 2020 18:00
Gist of all the miscellaneous things

Docker remove dangling images: docker rmi -f $(docker images --filter='dangling=true' -q).

Find and replace: find . -type f -name '*.txt' -exec sed -i '' s/this/that/ {} +.

Find pid of something running on : lsof -i :port.

@acharyab15
acharyab15 / tmux-cheatsheet.markdown
Created August 15, 2018 03:52 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close