Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
" Check if the function is already defined, then delete it before redefining it | |
if exists('*DeleteAllBuffersExceptCurrent') | |
delfunction DeleteAllBuffersExceptCurrent | |
endif | |
" Define a function in Vim 9.1 to delete all buffers except the current one | |
def DeleteAllBuffersExceptCurrent(check_empty: bool) | |
var current_buffer = bufnr('%') | |
for buffer in getbufinfo() | |
# echomsg buffer | |
if buffer.bufnr != current_buffer && buffer.listed && !buffer.changed && (!check_empty || (empty(buffer.windows) && empty(buffer.popups))) |
[alias] | |
adog = log --all --decorate --oneline --graph | |
adogf = log --all --decorate --oneline --graph --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' | |
## fetch origin main and merge into local main | |
fmain = "!f() { git fetch --all --prune && git fetch . origin/main:main; }; f" | |
ff = "!f() { branch=${1:-main}; git fetch --all --prune && git fetch . origin/$branch:$branch; }; f" | |
## rebase main with stash | |
rbmain = "!f() { git stash && git rebase main && git stash pop; }; f" | |
rb = "!f() { branch=${1:-main}; git stash && git rebase $branch && git stash pop; }; f" | |
## pull with stash |
" the key bindings are just as examples, for personal prefer | |
let fzf_installed = 0 | |
call plug#begin('~/.vim/plugged') | |
" NOTICE: you should add this part into your plugin#begin() .. plug#end() block | |
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } | |
Plug 'junegunn/fzf.vim' |
call plug#begin('~/.vim/plugged') | |
Plug 'voldikss/vim-floaterm' | |
nnoremap <silent> <C-T>c :FloatermNew<CR> | |
tnoremap <silent> <C-T>c <C-\><C-n>:FloatermNew<CR> | |
inoremap <silent> <C-T>c <Esc>:FloatermNew<CR> | |
nnoremap <silent> <C-T>p :FloatermPrev<CR> | |
tnoremap <silent> <C-T>p <C-\><C-n>:FloatermPrev<CR> | |
inoremap <silent> <C-T>p <Esc>:FloatermPrev<CR> | |
nnoremap <silent> <C-T><C-P> :FloatermPrev<CR> | |
tnoremap <silent> <C-T><C-P> <C-\><C-n>:FloatermPrev<CR> |
`@ | |
Usage: | |
Clone-Git git-repo-url | |
Clone-Git -SshKeyFilePath C:\path\to\private-ssh-key git-repo-url | |
to clone the repository with a specified ssh key | |
add this function to $PROFILE file, and then re-open PowerShell to use it. | |
@` | |
function Clone-Git |
# Usage: | |
# clonegit git-repo-url | |
# clonegit -c git-repo-url | |
# to clone and change into the cloned directory | |
# clonegit -k /path/to/private-ssh-key git-repo-url | |
# to clone the repository with a specified ssh key | |
# | |
# tested in bash and zsh, in Linux and macOS | |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
# | |
# Automatically generated file; DO NOT EDIT. | |
# Buildroot 2017.02 Configuration | |
# | |
BR2_HAVE_DOT_CONFIG=y | |
BR2_HOST_GCC_AT_LEAST_4_5=y | |
BR2_HOST_GCC_AT_LEAST_4_6=y | |
BR2_HOST_GCC_AT_LEAST_4_7=y | |
BR2_HOST_GCC_AT_LEAST_4_8=y | |
BR2_HOST_GCC_AT_LEAST_4_9=y |
import * as crypto from 'crypto'; | |
export const md5 = (contents: string) => crypto.createHash('md5').update(contents).digest("hex"); |
#!/bin/bash -e | |
DIST="centos7" | |
TAG="$(date +%Y%m%d)" | |
IMG_DIR="${PWD}/buildroot-${DIST}" | |
REPO_DIR="${IMG_DIR}/etc/yum.repos.d" | |
RPMS=( | |
bind-utils | |
bash |