Skip to content

Instantly share code, notes, and snippets.

% less .zshenv
ZDOTDIR="$HOME/.dotfiles/zsh"
. "$ZDOTDIR/.zshenv"
% less .zshenv
export EDITOR=vim
export AWS_DEFAULT_REGION=ap-southeast-2
export GPG_TTY="$TTY"
.zshrc
# .gitconfig
[includeIf "gitdir:~/codes/personal/"]
path = ~/.gitconfig-personal
[includeIf "gitdir:~/codes/work/"]
path = ~/.gitconfig-work
[include]
path = ~/.gitconfig-extra
# gitconfig-work
[user]
@melcloud
melcloud / gitconfig
Created January 16, 2024 23:42
My gitconfig
[pull]
ff = true
[mergetool]
KeepBackup = false
prompt = false
[alias]
gcg = config --global
co = checkout
cob = checkout -b
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto eol=lf
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
*.{ps1,[pP][sS]1} text eol=crlf
*.{psm1,[pP][sS][mM]1} text eol=crlf
###############################################################################
# Created by https://www.toptal.com/developers/gitignore/api/vim,linux,macos,windows,packer,powershell,visualstudio,visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=vim,linux,macos,windows,packer,powershell,visualstudio,visualstudiocode
### Linux ###
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences

Keybase proof

I hereby claim:

  • I am melcloud on github.
  • I am melcloud (https://keybase.io/melcloud) on keybase.
  • I have a public key ASBkpTspcoyjHr57d4_Q0xCiuF12yhJR8gqGVjlG2wlz6Ao

To claim this, I am signing this object:

@melcloud
melcloud / .editorconfig
Last active November 28, 2019 01:26
Editorconfig combined from Microsoft
root = true
[*]
charset = utf-8
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.{ps1,psm1,cmd,bat}]
@melcloud
melcloud / .editorconfig
Created November 26, 2019 19:27
editoconfig for .net
root = true
[*]
charset = utf-8
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
indent_size = 2
end_of_line = lf
@melcloud
melcloud / az.completion
Created March 28, 2019 10:43
Bash completion when running azure cli in docker
_python_argcomplete() {
local IFS=$'\013'
local SUPPRESS_SPACE=0
if compopt +o nospace 2> /dev/null; then
SUPPRESS_SPACE=1
fi
COMPREPLY=( $(docker run -i --rm -e "IFS=$IFS" \
-e "COMP_LINE=$COMP_LINE" \
-e "COMP_POINT=$COMP_POINT" \
-e "COMP_TYPE=$COMP_TYPE" \
Delete the relevant section from .gitmodules
git add .gitmodules
Delete the relevant section from .git/config
git rm --cached MODULE/TO-REMOVE
rm -rf .git/modules/MODULE/TO-REMOVE
rm -rf MODULE/TO-REMOVE
git add .
git commit
git push