- Main Menu > Edit > Redo : Ctrl+Y
- Main Menu > Window > Editor Tabs > Editor Close Actions > Close Tab : Ctrl+W
- Main Menu > Window > Editor Tabs > Reopen Closed Tab : Ctrl+Shift+T
- Tool Windows > Terminal : Alt+J
- Other > Bookmarks > Select File in Project View : Ctrl+;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# export | |
git diff > changes.patch | |
# import | |
git apply --reject --whitespace=fix changes.patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# cloud init | |
HOME_USER="ec2-user" | |
dnf update | |
# install docker | |
dnf install -y docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install zsh | |
sudo apt install -y zsh | |
# install oh-my-zsh | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
# install antigen | |
curl -L git.io/antigen > ~/.antigen.zsh | |
# init antigen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Parse command line arguments | |
while [ $# -gt 0 ]; do | |
case $1 in | |
#--env=*) export ENV="${1#*=}"; shift;; | |
--env) export ENV="$2"; shift 2;; | |
*) args+=("$1"); shift;; | |
esac | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import subprocess | |
from pathlib import Path | |
import venv | |
CURRENT_DIR = Path(__file__).resolve().parent | |
PROJECT_DIR = CURRENT_DIR.parent | |
VENV_NAME = "venv" | |
VENV_PATH = PROJECT_DIR / VENV_NAME | |
CONFIG_DIR = PROJECT_DIR / "config" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import chardet # pip install chardet | |
def decode(d, preferred_encodings): | |
for e in preferred_encodings: | |
try: | |
return d.decode(e) | |
except UnicodeDecodeError: | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package util | |
import ( | |
"reflect" | |
"strings" | |
) | |
var fieldNamesByTag = make(map[reflect.Type]map[string]map[string]string) | |
func BuildFieldsByTagMap(s interface{}, key string) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
if defined GVM_VERSION ( | |
echo ERROR: Cannot export on gvm terminal | |
exit /b | |
) | |
set GVM_VERSION=%1 | |
set GOROOT=C:\Go%1 | |
set GOPATH=E:\golang%1 | |
set PATH=%PATH%;%GOROOT%\bin;%GOPATH%\bin |
NewerOlder