-
Terraform Basics
Providers are for interacting with remote systems, like cloud providers, and call APIs. terraform init will install providers. Provider Config provider "aws" { access_key = var.aws_access_key secret_key = var.aws_secret_key region = "us-east-1" } Resources describe infrastructure objects and are implemented by a provider. resourc... Read More
-
Shell Scripting
Create a Bash Script Create a file named example.sh touch example.sh By convention, bash script has a .sh file extension, but it works without it. Add shebang Shell script starts with shebang #! following by the bash shell path. For example, use which bash to find the path of bash shell, add #! /usr/bin/bash to example.sh and then add comm... Read More
-
Regular Expression (Regex)
Basic Anchors ^abc, start with abc abc$, end with abc ^abc$, exact match abc Quantifiers c*, zero or more c (ab)*, zero or more ab and capture it c+, one or more c c?, zero or one c c{2}, 2 c c{2,}, 2 or more c c{2, 4}, 2 to 4 c OR operator (a|b), a or b, and capture it [ab], a or b, without capturing it Characters \d, a digit c... Read More
-
Markdown Quick Reference
Basic Syntax Element Syntax : Rendered : Heading # H1 \ ## H2 \ ### H3 Bold **bold text** : **bold text** : Italic *italic text* : *italic text* : Orde... Read More
-
Basic Linux Command
File and Navigating ls, list, print the contents of the current directory ., current directory .., parent directory ~, home directory -, previous directory /, root cd, change directory pwd, print working directory mkdir, make directory rm, remove file rmdir, remove directory cp, copy mv, move or rename touch, update access date of a... Read More
-
Shell Config and Alias
Shell Config # Enable vi mode bindkey -v Alias # Git alias ga='git add' alias gb='git branch' alias gc='git commit' alias gd='git diff' alias gl='git log --oneline' alias gs='git status' # Others alias ll='ls -la' Read More
-
How to Build a Blog Site
Instructions are based on ChromeOS Debian Linux Install Jekyll Install Ruby and other prerequisites sudo apt install ruby-full build-essential zlib1g-dev Add environment variables to configuration file Add below to ~/.zshrc # Install Ruby Gems to ~/gems export GEM_HOME="$HOME/gems" export PATH="$HOME/gems/bin:$PATH" source ~/.zshrc to app... Read More
-
Vim Setup and Basics
Most contents of this post are from the reference here Vim Config Save the config to ~/.vimrc " Enable Vim functionality instead of 100% Vi compatibility set nocompatible " Turn of syntax highlighting syntax on " Highlight matching bracket set showmatch " Show line number set number " Enable relative line numbering mode set relativenumber... Read More
-
Zsh Terminal Autocompletion
Install Zsh for Debian based distro sudo apt install zsh set Zsh as the default shell sudo chsh -s $(which zsh) ${USER} Install Zsh-z Plugin mkdir -p ~/.zsh/plugins/zsh-z curl https://raw.githubusercontent.com/agkozak/zsh-z/master/zsh-z.plugin.zsh \ -o ~/.zsh/plugins/zsh-z/zsh-z.plugin.sh add source ~/.zsh/plugins/zsh-z/zsh-z.plugin.sh t... Read More