go install golang.org/dl/gotip@latest
gotip download
mkdir /tmp/gopls && cd "$_"
gotip mod init gopls-unstable
#!/bin/bash | |
# Получаем текущую дату | |
TODAY=$(date +%Y-%m-%d) | |
# Получаем email текущего пользователя из git config | |
USER_EMAIL=$(git config user.email) | |
USER_NAME=$(git config user.name) | |
if [ -z "$USER_EMAIL" ]; then |
package main | |
import ( | |
"database/sql" | |
"fmt" | |
"math/rand" | |
"os" | |
"path/filepath" | |
"time" |
for name in $(git log --pretty="%ae%n%cn" | sort | uniq); do | |
git log \ | |
--author "$name" \ | |
--pretty=tformat: --numstat | | |
awk -v name="$name" '{ | |
add += $1; subs += $2; loc += $1 - $2 | |
} END { | |
if (loc != 0) | |
printf "[%s] Lines: +\033[32m%s\033[0m -\033[31m%s\033[0m; Total: %s\n", name, add, subs, loc | |
}' |
call plug#begin('~/.vim/plugged') | |
Plug 'fatih/vim-go' | |
Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'} | |
Plug 'preservim/nerdtree' | |
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } | |
Plug 'junegunn/fzf.vim' | |
Plug 'tpope/vim-fugitive' | |
Plug 'morhetz/gruvbox' | |
Plug 'NLKNguyen/papercolor-theme' |
lexicographical_compare( | |
// ... все символы строки l ... | |
begin(l), end(l), | |
// ... со всеми символами строки r ... | |
begin(r), end(r), | |
// ..., используя в качестве компаратора сравнение отдельных символов без учёта регистра | |
[](char cl, char cr) { return tolower(cl) < tolower(cr); } | |
); |
package main | |
import ( | |
"fmt" | |
"os" | |
"os/signal" | |
"syscall" | |
) | |
func main() { |
git checkout yourBranch | |
git reset $(git merge-base master yourBranch) | |
git add -A | |
git commit -m "one commit on yourBranch" |
This was useful for me when we created a new branch for a new major release, but were still working on our current version as well. I cloned our repo again and kept the new project on our new branch, but also wanted to get my stashes there.
git stash show -p > patch
You'll have to specify your stash and name your file whatevery you want. Do this for as all your stashes, and you'll have patch files in your pwd.