Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
for i in *.heic; do sips -s format jpeg -s formatOptions best "${i}" --out "${i%heic}.jpg" && touch -r "${i}" "${i%heic}.jpg"; done
void main(){
int a = 1;
dynamic b = '';
a = b;
print(a.floor());
}
module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "import", "eslint-plugin-localization"],
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended"
],
parserOptions: {
ecmaVersion: 2019,
sourceType: "module",
[mergetool "intellij"]
cmd = /Applications/WebStorm.app/Contents/MacOS/webstorm merge \
$(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") \
$(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") \
$(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") \
$(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED") \
&& read -n 1 -s
[mergetool "vscode"]
cmd = code --wait $MERGED
[merge]
#~/.gitconfig
[alias]
ignore = "!gi() {
curl -L -s https://www.gitignore.io/api/$@ ;
}; gi"
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
j() {
if [[ "$#" -ne 0 ]]; then
cd $(autojump $@)
return
fi
cd "$(autojump -s | gsed '/_____/Q; s/^[0-9,.:]*\s*//' | fzf --height 40% --nth 1.. --reverse --inline-info +s --tac --query "${*##-* }" )"
}
fbr() {
local branches branch
branches=$(git branch --all | grep -v HEAD) &&
branch=$(echo "$branches" |
fzf-tmux -d $(( 2 + $(wc -l <<< "$branches") )) +m) &&
git checkout $(echo "$branch" | sed "s/.* //" | sed "s#remotes/[^/]*/##")
}
nvim -c 'CocInstall -sync coc-tsserver coc-css coc-emmet coc-eslint coc-git coc-json coc-pairs coc-python coc-tslint-plugin coc-tsserver coc-ultisnips coc-stylelint coc-dictionary coc-tag coc-word coc-smartf coc-jest coc-tabnine|q'
[core]
editor = nvim
package daoservice;
import java.util.function.Consumer;
@SuppressWarnings("unused")
public final class DaoService {
private ConnectionPool pool = new ConnectionPool(1);
public void updateTimestamp(long id) {
perform(conn -> {