vscode - File Watcher setting for proto format
{
"filewatcher.commands": [
{
"match": "\\.proto*",
"isAsync": true,
"cmd": "clang-format -style=\"{BasedOnStyle: Google, IndentWidth: 4, ColumnLimit: 0, AlignConsecutiveAssignments: true, AlignConsecutiveAssignments: true}\" -i ${file}",
"event": "onFileChange"
}
FROM alpine:latest | |
RUN apk --no-cache --virtual .fontsinstaller add msttcorefonts-installer fontconfig \ | |
&& update-ms-fonts \ | |
&& fc-cache -f \ | |
&& apk del .fontsinstaller | |
Run rm /var/cache/apk/*; exit 0 | |
ENV GDFONTPATH=/usr/share/fonts/truetype/msttcorefonts/ | |
# Install gnuplot from source, to make sure we do have GD support etc. |
package main | |
import ( | |
"context" | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
"os" | |
"time" |
var bulkOps = []; | |
var allDocs = db.ranking.find().toArray(); | |
allDocs.forEach(doc => { | |
var bettingOddsVal = parseFloat(doc.betting_odds).toFixed(2); | |
bulkOps.push({ | |
updateOne: { | |
filter: { _id: doc._id }, | |
update: { $set: { betting_odds_val: bettingOddsVal } } | |
} | |
}); |
// js 最高就到 56 位,加上雙引號改成字串 | |
var resp = responseBody.replace(/([0-9]{8,100})/g, '\"$1\"'); | |
var jsonData = JSON.parse(resp); | |
postman.setEnvironmentVariable("accountID", jsonData.data.accountID); |
.PHONY: setup | |
setup: | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
#### 重灌常用 | |
brew install docker docker-compose neovim yj yq git git-gui go fzf bat ripgrep autojump the_silver_searcher clang-format cmake fish htop node wget jq python | |
#### 重灌常用-cask | |
brew install --cask lens microsoft-edge iterm2 postman bloomrpc tor-browser sublime-text visual-studio-code telegram another-redis-desktop-manager appcleaner drawio jetbrains-toolbox notion spectacle | |
#### neovim config Ref. https://github.com/rafi/vim-config | |
make setup-nvim-prerequisites |
This specification is inspired by and supersedes the [AngularJS commit message format][commit-message-format].
We have very precise rules over how our Git commit messages must be formatted. This format leads to easier to read commit history.
Each commit message consists of a header, a body, and a footer.
To install fish shell on windows the options are:
- Cygwin
- WSL
- MSYS2
Since git bash is based on MSYS2 it seems a good fit to install fish. The problem is that git bash is a lightweight version of MSYS2 which does not include pacman
as a package management, used to install fish.
This OS thread has great suggestions on how to solve this problem including using the full MSYS2. But the best solution for me was this answer by Michael Chen which installs pacman
on git bash.
package main | |
import ( | |
"context" | |
"sync" | |
"time" | |
"github.com/redis/go-redis/v9" | |
"github.com/rs/zerolog/log" | |
_ "net/http/pprof" |