This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git config --global init.defaultBranch main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [alias] | |
| clean-branch = !git fetch -p | git branch -vv | grep ': gone]' | awk '{print $1}' | xargs git branch -D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CLUSTER_NAME=$YOUR_CLUSTER_NAME | |
| TASK_DEF_NAME=$YOUR_TASK_NAME | |
| SERVICE_NAME=$YOUR_SERVICE_NAME | |
| task_arn=$(aws ecs list-task-definitions --family-prefix "$TASK_DEF_NAME" --query "reverse(taskDefinitionArns)[0]" --output text) | |
| # Describe the ECS service to get network configuration details | |
| network_config=$(aws ecs describe-services --cluster $CLUSTER_NAME --services $SERVICE_NAME --query 'services[0].networkConfiguration.awsvpcConfiguration' --output json) | |
| # Extract subnets and security groups |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| HIST_STAMPS="yyyy-mm-dd" | |
| # fzf history | |
| function fzf-select-history() { | |
| local selected=$(history -n -r 1 | fzf --query "$LBUFFER" --reverse) | |
| if [ -n "$selected" ]; then | |
| BUFFER=$(echo "$selected" | awk '{$1=""; $2=""; print $0}' | sed 's/^[ \t]*//') | |
| CURSOR=$#BUFFER | |
| zle reset-prompt | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function fzf-src(){ | |
| local src=$(ghq list --full-path | fzf --query "$LBUFFER" --layout=reverse) | |
| if [ -n "$src" ]; then | |
| BUFFER="cd $src" | |
| zle accept-line | |
| fi | |
| zle -R -c | |
| } | |
| zle -N fzf-src | |
| bindkey '^]' fzf-src |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if [[ -n $(echo ${^fpath}/chpwd_recent_dirs(N)) && -n $(echo ${^fpath}/cdr(N)) ]]; then | |
| autoload -Uz chpwd_recent_dirs cdr add-zsh-hook | |
| add-zsh-hook chpwd chpwd_recent_dirs | |
| zstyle ':completion:*' recent-dirs-insert both | |
| zstyle ':chpwd:*' recent-dirs-default true | |
| zstyle ':chpwd:*' recent-dirs-max 1000 | |
| zstyle ':chpwd:*' recent-dirs-file "$HOME/.cache/chpwd-recent-dirs" | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gh pr view 1 --json commits --jq '.commits[].messageHeadline' | grep "Merge pull request" | grep -o '#[0-9]\+' |
OlderNewer