Skip to content

Instantly share code, notes, and snippets.

View chengyayu's full-sized avatar
🖖
HAPPY HACKING

Yayu chengyayu

🖖
HAPPY HACKING
View GitHub Profile
@chengyayu
chengyayu / .gitconfig
Created October 30, 2023 16:54 — forked from Kovrinic/.gitconfig
git global url insteadOf setup
# one or the other, NOT both
[url "https://github"]
insteadOf = git://github
# or
[url "git@github.com:"]
insteadOf = git://github
@chengyayu
chengyayu / .gitconfig
Created August 10, 2020 08:17 — forked from rambabusaravanan/.gitconfig
Git Diff and Merge Tool - IntelliJ IDEA
# Linux
# add the following to "~/.gitconfig" file
[merge]
tool = intellij
[mergetool "intellij"]
cmd = /usr/local/bin/idea merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED")
trustExitCode = true
[diff]
@chengyayu
chengyayu / decorator.go
Created June 5, 2020 04:49 — forked from saelo/decorator.go
Decorators in Go
package main
import (
"fmt"
"reflect"
)
func Decorate(impl interface{}) interface{} {
fn := reflect.ValueOf(impl)