Skip to content

Instantly share code, notes, and snippets.

View tanapoln's full-sized avatar

Tanapol Nearunchorn tanapoln

View GitHub Profile
@tanapoln
tanapoln / globalmutex.go
Created January 31, 2021 05:08
Custom analyzer which prevent using sync.Mutex as global variable
import (
"go/ast"
"golang.org/x/tools/go/analysis"
)
var Analyzer = &analysis.Analyzer{
Name: "globalmutex",
Doc: "declare global mutex has no effect in multi-process, do not use",
Run: run,
#!/usr/bin/env bash
DOWNLOAD_LINK=$1
FILENAME=$2
if [[ -z "$DOWNLOAD_LINK" || -z "$FILENAME" ]]; then
echo "Error: missing DOWNLOAD_LINK or FILENAME"
echo "Usage: install-bin.sh [DOWNLOAD_LINK] [FILENAME]"
exit 1
fi
@tanapoln
tanapoln / setup-mac.sh
Last active June 15, 2024 09:32
Setup my mac osx
#!/usr/bin/env bash
set -e
#install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
/opt/homebrew/bin/brew install autoconf automake bash bison coreutils curl direnv fish freetype gd gettext git icu4c krb5 libedit libiconv libjpeg libpng libxml2 libzip mas pkg-config re2c wget zlib libsodium imagemagick gmp oniguruma mise libpq argon2
/opt/homebrew/bin/brew install docker docker-compose kubectl pyenv hey jq ffmpeg openssl@1.1
/opt/homebrew/bin/brew install --cask visual-studio-code linearmouse iterm2 wrap google-chrome jetbrains-toolbox karabiner-elements vlc lens wireshark pgadmin4 1password 1password-cli proxyman
@tanapoln
tanapoln / keybase.md
Created May 14, 2024 05:03
keybase.md

Keybase proof

I hereby claim:

  • I am tanapoln on github.
  • I am tanapoln (https://keybase.io/tanapoln) on keybase.
  • I have a public key ASDc9_yBhBNgC11hOreQgAAZqzrrKdVORkI0iRqTRr0XpAo

To claim this, I am signing this object: