Create subcommands based on this key. e.g. If leader is space key, <space> + sf displays UI to search files.
up/down/left/right cursor do exactly as they are named.
Alternatively, you cna also use:
k (up)
| #!/bin/bash | |
| set -e | |
| IFS='|' | |
| ENV_NAME="nirdosh" | |
| echo "importing environment '$ENV_NAME'..." | |
| ENV_CONFIGS=$(amplify env get --name $ENV_NAME --json | jq -c '.awscloudformation | {Region, DeploymentBucketName, UnauthRoleName, StackName, StackId, AuthRoleName, UnauthRoleArn, AuthRoleArn}') |
vi <filename>ESC | Insert mode: iΒ | Command mode: :
In normal mode, we can execute Vim commands to search, and transform text. In Insert mode, we can edit the file content.:wqv to start visual selection. Select lines with arrow keys.y | Paste with pΒ dΒ . Press dot as many times as you want to repeat the command (e.g. indent)/ E.g. /nodePortcommand: ['sh', '-c', 'command'] for safety.command: ['cowsay Welcome to CKAD!']
# writes output of command to a file
while true; do date >> /opt/time/time-check.log; sleep 2 ;done| # -------- Usage ----------- | |
| # 1. Download this file and save as docker-compose.yaml | |
| # 1. Go to the downloads folder and run command: docker-compose up | |
| # To close the server: Either do 'CTRL + C' OR 'docker-compose down' | |
| # 2. Open Azure data studio | |
| # 3. Create new connection with following settings: | |
| # Connection Type: Microsoft SQL Server | |
| # Server: localhost,1433 | |
| # Authentication Type: SQL Login | |
| # User name: SA |
| defaults write com.apple.screencapture location /Users/nirdoshgautam/Screenshots |
| 1. Receiver | |
| 1.1 Print out receiver IP. We need this IP in step 2. | |
| β―β―β― ipconfig getifaddr en0 | |
| 1.2 Run this command in the receiving computer listen to the port 4444 and print out msg: | |
| β―β―β― nc -vl 4444 | |
| If you want to save msg to a file: | |
| β―β―β― nc -vl 4444 > received_msg.txt |
| #!/bin/bash | |
| function progress_bar() { | |
| if [ $1 -eq 0 ];then | |
| comp_p=0 | |
| else | |
| COMPLETED=$(($COMPLETED+$STEPS)) | |
| comp_p=$(jq -n $1/$ITEM_COUNT*100) | |
| comp_p=$(echo ${comp_p%.*}) | |
| fi |
| #! /bin/bash | |
| # -------------------- Usage --------------------- | |
| # Opt 1. Download the script locally and run: | |
| # β―β―β― curl -s https://gist.githubusercontent.com/nirdosh17/72f7ed77412002aaa38548831fc688b5/raw -o ~/cluster_info.sh && chmod +x ~/cluster_info.sh && ./cluster_info.sh | |
| # Opt 2. If you don't want to download the script locally, run from URL: | |
| # β―β―β― bash <(curl -s https://gist.githubusercontent.com/nirdosh17/72f7ed77412002aaa38548831fc688b5/raw) | |
| # You can also pass the ENV LABEL: | |
| # β―β―β― ENV_LABEL=nirdosh bash <(curl -s https://gist.githubusercontent.com/nirdosh17/72f7ed77412002aaa38548831fc688b5/raw) |