Skip to content

Instantly share code, notes, and snippets.

Avatar

Henrique Vicente henvic

View GitHub Profile
View release.sh
function publish() {
equinox release \
--version=$NEW_RELEASE_VERSION \
--channel=$RELEASE_CHANNEL \
--config=$config \
-- \
-ldflags="-X 'github.com/wedeploy/cli/defaults.Version=$NEW_RELEASE_VERSION' \
-X 'github.com/wedeploy/cli/defaults.Build=$BUILD_COMMIT' \
-X 'github.com/wedeploy/cli/defaults.BuildTime=$BUILD_TIME'" \
-gcflags=-trimpath=$GOPATH \
@henvic
henvic / README.md
Last active Feb 21, 2019
Go repositories licenses on GitHub (February, 2019)
View README.md
@henvic
henvic / indirect.go
Last active Apr 4, 2018
indirect (similar to json.Unmarshal(data []byte, v interface{}) - Public Domain, MIT License
View indirect.go
package indirect
import (
"errors"
"fmt"
"reflect"
)
// Inspired by the unmarshal functions on
// https://golang.org/src/encoding/json/decode.go
@henvic
henvic / adder.go
Created Mar 7, 2018
fs-notify listener (for debugging load-balancer issue 248 and 'custom domain mock adder')
View adder.go
package main
import (
"errors"
"flag"
"fmt"
"io/ioutil"
"math/rand"
"os"
"path/filepath"
@henvic
henvic / main.go
Created Oct 16, 2017
Simple dirty example of using Go's json.Marshal and json.Unmarshal
View main.go
package main
import (
"encoding/json"
"fmt"
"log"
)
// Event to record
type Event struct {
@henvic
henvic / README.md
Last active Feb 21, 2019
Go repositories licenses on GitHub
View README.md
@henvic
henvic / README.md
Last active Oct 13, 2017
gitless proposal: easier git stash area
View README.md

This is a project work for the class I am taking (Advanced Topics in Software Engineering).

Context

legit is a complimentary Command-Line-Interface tool for git that adds some commands which proposes to simplify git interface. See Purposes, Concepts, Misfits, and a Redesign of Git.

Improvement idea: legit stash

git stash is a powerful git command for stashing changes in a dirty working directory.

This is very useful for when you are working on something, but have to stop for a while to do something else.

View ttyissue.go
package main
import (
"bufio"
"fmt"
"os"
"syscall"
"golang.org/x/crypto/ssh/terminal"
)
@henvic
henvic / bash
Last active Apr 12, 2017
Weird timezone issue
View bash
# changing my timezone on my
# macOS Sierra Version 10.12.4 (16E195)
# see video on https://cl.ly/0o3V1b0o3p0P/timezone-issue.gif
# instead of having timezone = BRT it is showing the current offset to UTC
$ uname -a
Darwin henvic.local 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64
henvic at henvic in ~/time
$ go run time.go
current: Wed Apr 12 09:32:37 PDT 2017