Skip to content
View liuyangc3's full-sized avatar

Organizations

@nxintech

Block or report liuyangc3

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
liuyangc3/README.md

Git

Set the git credentail

git config --global url."https://liuyangc3:${GITHUB_TOKEN}@git.example.com".insteadOf "https://git.example.com"

Remove all git branchs except master or main

git branch | grep -v -e master -e main | xargs git branch -D

Rebase remote master to local

git pull --rebase origin master

Amend a previou commit without changing commit

git commit --no-edit --amend

List tags

git tag --sort=-creatordate

# list remote tag
git ls-remote --tags origin

Add tag

export tag=v0.0.1
git tag -a $tag -m "commit message" && git push origin $tag

Remove a tag

export tag=v0.0.1
# local
git tag --delete $tag

# remote
git push --delete origin $tag
# or push empty tag
git push origin :$tag

allow auto push to remote new branch

git config push.autoSetupRemote true

Set http credential cache

git config --global credential.helper "cache --timeout=86400" # 86400s=24h

Jetbrain IDEs

short cut explaintion
⌘(Command) + ⌥(Option) + A git add
⌘(Command) + L goto line
⌘(Command) + ⇧(Shift) + F search text in dir
⌘(Command) + ⇧(Shift) + R replace text in dir
X a|b

Others

⚡ Rmove all <none> docker images

docker rmi $(docker images -a --digests=true | awk '$2 == "<none>" { print $4}')

Skip Spectral Scan

export SKIP_PRE_PUSH=1
git push

teleport

Get instance UUID

tsh ls --search=10.49.212.235 -f json | jq '.[0].metadata.name'

# or
tctl nodes ls | grep 10.49.212.235

Detele insatnce by UUID

tctl rm node/5370cc0f-fbae-4c47-9178-319e09b9b5f6

Pinned Loading

  1. note-book note-book Public

    some notes

    Python 7 1

  2. netlink_inet_diag netlink_inet_diag Public

    netlink with inet_diag

    C 2 2

  3. nginx-config-parser nginx-config-parser Public

    nginx upstream parser

    Python 9 1

  4. heka-redis-plugin heka-redis-plugin Public

    only support redis list

    Go 3