Skip to content

Instantly share code, notes, and snippets.

View pm-hwks's full-sized avatar
:octocat:

pm-hwks pm-hwks

:octocat:
View GitHub Profile
@pm-hwks
pm-hwks / kubectl-multi-version-brews.md
Created January 14, 2020 22:29 — forked from rdump/kubectl-multi-version-brews.md
kubectl multi-version brews (kubernetes-cli formula)

kubectl multi-version brews

We need to run multiple versions of kubectl for compatibility with various kubernetes clusters.

It's a bit easier to get and use multiple versions of kubectl using Homebrew than it is using Macports.

With brew, it's simple to:

  • Install a bunch of versions of kubectl (in the kubernetes-cli Formula)
  • Switch between them as needed
@pm-hwks
pm-hwks / tmux-cheatsheet.markdown
Last active July 14, 2022 04: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
@pm-hwks
pm-hwks / ansible_update_user.yml
Created May 24, 2021 00:08 — forked from trongnghia203/ansible_update_user.yml
Ansible: Add/update/remove user
---
# -----------------------------------------------------------------------------------------
# Purpose: To manage system users:
# - create/upadate a user who is allowed accessing via ssh connection
# - add public ssh-key of user into its authorized_keys
# - allow user to use sudo by putting a config into /etc/sudoers.d/
# - remove authorized_keys of inactive users
# - remove inactive users
# - remove sudo permission by removing its config file in /etc/sudoers.d/ if any
# Maintanance: Nghia Le [at] INFOTECHVIET