2022-10-04
aws-find-by-ip

使用 cmd 範例

  • aws ec2 describe-network-interfaces --region=us-west-1 --filters Name=addresses.private-ip-address,Values=10.0.0.1

Reference

Read More

2022-09-16
git-branch-tips

用 git 的好處,就是可以很方便的建立 & 刪除 branch
就記錄一下,目前有用到的 & 找到的使用 branch 的一些技巧 & 資料

使用 cmd 建立 local branch & 設定到 remote

  • 建立 local branch
    • git checkout -b <branch-name>
  • 將建立好的 branch push 到 remote
    • git push <remote-name> <branch-name>
      • <remote-name> is typically origin
  • 設定 push
    • git push --set-upstream <remote-name> <local-branch-name>
    • git push -u origin <local-branch-name>

清除 local branch 的方式 (單一的 branch)

  • 清 local branch 的方式
    • git branch -d <branch>

清除 remote branch 的方式 (一次 sync branch)

  • 跟 origin fetch 時,一併清除 remote 上不存在的 branch
    • $ git fetch --prune origin

清除 remote branch 的方式 (單一的 branch) - 不常用

  • 清 remote branch (已刪除的 branch)
    • $ git remote prune <remote>
    • `$ git remote -v

origin https://gitserver.com/user/repository.git (fetch)
origin https://gitserver.com/user/repository.git (fetch)
`

Reference

Read More

2022-01-14
browse-tree

看到一個瀏覽 tree / folder 的新工具,還滿有趣的,先記錄一下

Reference

Read More

2021-01-14
useful_splunk_cmd

列出,常用的 splunk cmd 作為參考用

command

Read More

2020-06-01
another_grep_rg_command

GitHub project

Reference

Read More

2020-06-01
another_find

最近在試用 fzf 時,有看到這個類似的 find 指令。裝了之後,覺得滿好用的

  • 使用 command
    1
    $ fd PATTERN

gitHub project

  • sharkdp/fd
    • A simple, fast and user-friendly alternative to ‘find’

Reference

Read More