Skip to content

Instantly share code, notes, and snippets.

View snowmerak's full-sized avatar
Ⓜ️

snowmerak snowmerak

Ⓜ️
View GitHub Profile
@hsnks100
hsnks100 / .bashrc
Last active December 20, 2022 03:43
개발환경에 필요한 스크립트 모음
source scl_source enable devtoolset-7
set -o vi
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1='\[\e[0;36m\]\u\[\e[0m\]@\[\e[0;33m\]\h\[\e[0m\]$(parse_git_branch)\[\e[0;35m\]
// Untar takes a destination path and a reader; a tar reader loops over the tarfile
// creating the file structure at 'dst' along the way, and writing any files
func Untar(dst string, r io.Reader) error {
gzr, err := gzip.NewReader(r)
if err != nil {
return err
}
defer gzr.Close()