Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jihuichoi's full-sized avatar

Jihui Choi jihuichoi

View GitHub Profile
package main
import (
"fmt"
"os/exec"
"runtime"
)
const VLCCONFIG = "$HOME/.config/vlc/vlcrc"
#!/usr/bin/env python
# # -*- coding: UTF-8 -*-
import os
if __name__ == "__main__":
vlc_config = "~/.config/vlc/vlcrc"
# web http 인터페이스 설정
@jihuichoi
jihuichoi / fix_wrong_author.sh
Created September 1, 2019 01:12
git 작성자 수정하기
# https://www.git-tower.com/learn/git/faq/change-author-name-email
git filter-branch --env-filter '
WRONG_EMAIL="wrong@example.com"
NEW_NAME="New Name Value"
NEW_EMAIL="correct@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
then
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
@jihuichoi
jihuichoi / print.go
Last active August 31, 2019 14:18
go struct 를 json 형식으로 보기 좋게 출력함. stdout
package utils
import (
"encoding/json"
"fmt"
"strings"
)
func PrettyPrint(target ...interface{}) {
replacer := strings.NewReplacer("\t", " ", "\n", "")
@jihuichoi
jihuichoi / keybindings.json
Created August 22, 2019 09:55
to navigate backward/forward using mouse button 4,5 on mac
[
// move backward/forward using mouse button 4, 5
{ // remove exsiting bind
"key": "",
"command": "editor.action.indentLines",
"when": "editorTextFocus && !editorReadonly"
},
{ // remove exsiting bind
"key": "",
@jihuichoi
jihuichoi / set_gopath.txt
Last active September 4, 2019 00:17
how to set gopath on mac or linux
# Edit ~/.bash_profile or ~/.bashrc or ~/.zshrc ....
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH
# Reload profile : source ~/.bash_profile
@jihuichoi
jihuichoi / find_addition_chain.go
Last active June 9, 2019 18:21
find the shortest addition chain for n
package main
import (
"fmt"
"sort"
)
// for play.golang.org
// https://play.golang.org/p/xJqi8EPIfSi
func main() {
@jihuichoi
jihuichoi / test_gist.go
Last active December 27, 2018 11:17
test gist
package gist
import "fmt"
func main() {
fmt.Println("test")
}