Skip to content

Instantly share code, notes, and snippets.

View thiagocaiubi's full-sized avatar
😄

Thiago Caiubi thiagocaiubi

😄
View GitHub Profile
@thiagocaiubi
thiagocaiubi / join_test.go
Created January 24, 2018 15:42 — forked from dtjm/join_test.go
strings.Join vs fmt.Sprintf vs string concat (+)
package join
import (
"fmt"
"strings"
"testing"
)
var (
testData = []string{"a", "b", "c", "d", "e"}
@thiagocaiubi
thiagocaiubi / main.go
Created December 2, 2015 18:37 — forked from danesparza/negroni-gorilla.go
Negroni with Gorilla mux subrouter
package main
import (
"fmt"
"github.com/codegangsta/negroni"
"github.com/gorilla/mux"
"log"
"net/http"
)
@thiagocaiubi
thiagocaiubi / API.md
Last active August 29, 2015 14:26 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

#to add network restriction
sudo tc qdisc add dev lo root netem delay 100ms
#to remove it network restriction
sudo tc qdisc del dev lo root netem delay 100ms
#Colors
git config --global color.branch auto
git config --global color.diff auto
git config --global color.interactive auto
git config --global color.status auto
#User
git config --global user.name "Thiago Caiubi"
git config --global user.email thiago.caiubi@gmail.com
@thiagocaiubi
thiagocaiubi / gist:2200230
Created March 25, 2012 21:57 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@thiagocaiubi
thiagocaiubi / gist:996888
Created May 28, 2011 14:04 — forked from theleoborges/gist:996758
A few useful git commands
#undo last commit
git reset HEAD^
#show files in a given commit
git show --pretty="format:" --name-only rev_number
#remove untracked files and directories
git clean -f -d
#track remote branch
#!/bin/bash
PASTEL='{
"Ansi 0 Color" = {
"Blue Component" = 0.3097887;
"Green Component" = 0.3097887;
"Red Component" = 0.3097887;
};
"Ansi 1 Color" = {
"Blue Component" = 0.3764706;