Skip to content

Instantly share code, notes, and snippets.

View telnet2's full-sized avatar

Joohwi Lee telnet2

View GitHub Profile
@telnet2
telnet2 / keyboard.json
Last active September 19, 2022 12:23
VSCode Shortcut
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "alt+r",
"command": "workbench.action.debug.run",
"when": "!inDebugMode"
},
{
"key": "ctrl+f5",
"command": "-workbench.action.debug.run",
@telnet2
telnet2 / prompt_sorin_setup.zsh
Created June 12, 2022 21:00
prompt sorin update
#
# A simple theme that displays relevant, contextual information.
# Move git info to the left prompt and remove the right prompt
#
# Authors:
# Sorin Ionescu <[email protected]>
#
# Screenshots:
# http://i.imgur.com/nrGV6pg.png
#
@telnet2
telnet2 / install_protobin.sh
Created March 24, 2022 03:18
Install protobuf binaries
#!/bin/sh
# install protoc v3.19.3ls
brew install protobuf
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install github.com/gogo/protobuf/protoc-gen-gogoslick@latest
@telnet2
telnet2 / alias.sh
Created March 10, 2022 18:12
Shell Aliases
alias \
kps='kill $(ps -f |grep -v -E "(zsh|PID|ps)"|awk "{ print \$2}")' \
dc=docker-compose \
g-='git checkout -' \
gm='git checkout master'
@telnet2
telnet2 / go.json
Last active February 14, 2022 15:41
VSCode GO Gist (Library/Application Support/Code/User/snippets/go.json)
{
"context create": {
"prefix": "ctx",
"description": "create a background context",
"body": [
"ctx := context.${1:Background}()"
]
},
"anonymous defer function": {
"prefix": "dfc",
@telnet2
telnet2 / test.go
Created January 29, 2022 23:24
Snippet for test suite
package confutil
import (
"testing"
"github.com/stretchr/testify/suite"
)
type TestMe struct {
suite.Suite
@telnet2
telnet2 / setup.zsh
Last active August 7, 2021 19:12
Debian Bullseye Setup script
# for the docker image debian:bullseye
ZHOME="${ZDOTDIR:-$HOME}/.zprezto"
# sudo apt-get install git software-properties-common
if [ ! -d "${ZHOME}" ]; then
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZHOME}"
git clone https://github.com/zdharma/fast-syntax-highlighting "${ZHOME}/modules/fast-syntax-highlighting"
@telnet2
telnet2 / remove_color.sh
Created March 9, 2021 18:14
Remove color tags
env | sort | sed 's/\x1B[@A-Z\\\]^_]\|\x1B\[[0-9:;<=>?]*[-!"#$%&'"'"'()*+,.\/]*[][\\@A-Z^_`a-z{|}~]//g' >! /tmp/norm.env
// This file was initially generated by Windows Terminal 1.0.1401.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
// You can add more global application settings here.
# install bash-it
git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it
~/.bash_it/install.sh
# change theme to clean for bash-it
# install fzf
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install