Command Line
Using the history Command
· β˜• 2 min read
1. The history Command The history command lets you view the command history of the current session. When you exit the shell, the command history is saved to the corresponding history file. For bash, the command history is saved in the ~/.bash_history file; for zsh, it is saved in ~/.zsh_history. You can also use the HISTFILE environment variable to specify the location of the history file: export HISTFILE=/data/ops/bash_history.

How to Configure an Efficient Kubernetes Command-Line Terminal
· β˜• 2 min read
Sharpening the axe never delays the woodcutting. No matter when, the time you spend on your toolchain is always worth it. 1. Autocompletion - kubectl OS X install command: 1 brew install bash-complete@2 It is not just for kubectl β€” it provides completion prompts for other command lines too.

Using Homebrew
· β˜• 2 min read
Homebrew is the package manager for OS X, similar to yum on CentOS or apt-get on Ubuntu. From the OS X command line you can install applications with the brew and brew cask commands. 1. Install brew cask 1 brew install brew-cask-completion 2. The Difference Between brew and brew cask The difference between brew and brew cask lies in the type of application they favor.

Advanced curl Usage
· β˜• 1 min read
1. RESTful Requests 1 curl -X POST --data 'keyword=value' http://domain.com/mypath/ After -X you can also use DELETE, PUT, and so on. 2. Adding Headers 1 curl -H 'Content-Type:application/json' -H 'Authorization: bearer MyToken' http://domain.com/mypath/ 3. Basic Authentication 1 curl -u username:password http://domain.com/mypath/ 4. Download and Execute 1 curl -sSL http://domain.com/my.sh | bash 5.

Common Git Commands
· β˜• 2 min read
1. Basic Concepts Workspace: the working area, the project files Index: the staging area, also called the pending-commit area; before a commit enters the repo, all updates are placed in the staging area Local Repository: the local repo, the version repository kept locally; HEAD points at the current development branch