go install golang.org/dl/gotip@latest
gotip download
mkdir /tmp/gopls && cd "$_"
gotip mod init gopls-unstable
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.
'use strict'; | |
const NODE_ENV = process.env.NODE_ENV || "development"; //переменная окружения нужная для переключения между dev/prod | |
const webpack = require('webpack'); | |
module.exports = { | |
context: __dirname + "/frontend", //указывается root, где искать файлы для entry | |
entry: { //объект, когда несколько точек входа. строка, когда одна | |
home: "./home", | |
about: "./about", |
// Поместите настраиваемые сочетания клавиш в этот файл, чтобы перезаписать клавиши по умолчанию. | |
[ | |
{ | |
"key": "shift+cmd+-", | |
"command": "editor.foldAll", | |
"when": "editorTextFocus" | |
}, | |
{ | |
"key": "cmd+k cmd+0", | |
"command": "-editor.foldAll", |