Skip to content

Instantly share code, notes, and snippets.

Have a nice day

Thiago Zilli Sarmento thiagozs

Block or report user

Report or block thiagozs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
thiagozs /
Created Mar 8, 2019
Clear Snap old versions
# Removes old revisions of snaps
set -eu
sudo snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
sudo snap remove "$snapname" --revision="$revision"
thiagozs / vscode-go.txt
Created Jan 11, 2019
Install deps of vscode go
View vscode-go.txt
go get -u -v
go get -u -v
go get -u -v
go get -u -v
go get -u -v
go get -u -v
go get -u -v
go get -u -v
go get -u -v
go get -u -v
thiagozs /
Last active Oct 16, 2018
Tutorial gomock

Testing with GoMock: A Tutorial

08/16/17 by  Sergey Grebenshchikov

No Comments

This is a quick tutorial on how to test code using the GoMock mocking library and the standard library testing package testing.

GoMock is a mock framework for Go. It enjoys a somewhat official status as part of the organization, integrates well with the built-in testing package, and provides a flexible expectation API.

thiagozs / limitrate.go
Created May 8, 2018
Test implement limit rate
View limitrate.go
package main
import (
func main() {
interval := float64(1000) // start limit interval

Golang deps 1.9

Command line execute:

go get -v && \
go get -v && \
go get -v && \
go get -v && \
go get -v && \
thiagozs /
Last active Feb 1, 2017
The Big Hackathon CPBR #10 - 2017

API ONU #CPBR10 • The Big Hackathon

Stack of development

  • Raspbarry pi 2 or 3
  • Distincts devices of Raspberry
  • Linux Ubuntu/Debian distribution
  • Golang >= 1.7.3
  • Docker >= 1.2
  • MongoDB >= 3.X.X
  • Nginx
thiagozs /
Last active Dec 15, 2016
Docker installer checklist

Docker Installer


  • Update apt-get.
$ sudo apt-get update
  • Get PGP key.

An alternative to using is to generate a personal access token on your GitHub account, grant it repo access, and then use the following instead:

git config --global url."https://${GITHUB_TOKEN}".insteadOf ""

That should still work with go get -u, and also works with Docker builds (my particular use case, and how I came across your gist).


Delete all file except file1

rm !(file1)  

Delete all file except file1 and file2

rm !(file1|file2)  

Delete all file except all zip files

rm !(*.zip)  

Delete all file except all zip and iso files



How To Install Java with Apt-Get on Ubuntu 16.04


Java and the JVM (Java's virtual machine) are widely used and required for many kinds of software. This article will guide you through the process of installing and managing different versions of Java using apt-get.


You can’t perform that action at this time.