Skip to content

Instantly share code, notes, and snippets.


Thiago Caiubi thiagocaiubi

View GitHub Profile

Keybase proof

I hereby claim:

  • I am thiagocaiubi on github.
  • I am thiagocaiubi ( on keybase.
  • I have a public key ASAHT01Jv1rg0eCIYqQwRtkIMaS0TnOVKU6pDTUXOWav2Qo

To claim this, I am signing this object:

thiagocaiubi / main_test.go
Last active Feb 23, 2018
A boilerplate for Go table-driven tests running in parallel
View main_test.go
package main_test
import "testing"
func TestMain(t *testing.T) {
testCases := []struct {
name string
name: "test name",
thiagocaiubi / join_test.go
Created Jan 24, 2018 — forked from dtjm/join_test.go
strings.Join vs fmt.Sprintf vs string concat (+)
View join_test.go
package join
import (
var (
testData = []string{"a", "b", "c", "d", "e"}
View gist:4030764cf958207a125c28e9e856253e
☁ /tmp terraform init
Initializing provider plugins...
- Checking for available provider plugins on
- Downloading plugin for provider "azurerm" (0.2.2)...
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
View gist:1c39ca2a9e40f866cc8ae3473b273cf1
☁ /tmp cat
terraform {
version = "0.10.7"
provider "azurerm" {
version = "0.3"
resource "azurerm_resource_group" "test" {
View tmux.conf
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Rebind prefix key
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
View terraform-import-azurerm
website/source/docs/providers/azurerm/r/availability_set.html.markdown:terraform import azurerm_availability_set.group1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/availabilitySets/webAvailSet
website/source/docs/providers/azurerm/r/cdn_endpoint.html.markdown:terraform import azurerm_cdn_endpoint.test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Cdn/profiles/myprofile1/endpoints/myendpoint1
website/source/docs/providers/azurerm/r/cdn_profile.html.markdown:terraform import azurerm_cdn_profile.test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Cdn/profiles/myprofile1
website/source/docs/providers/azurerm/r/container_registry.html.markdown:terraform import azurerm_container_registry.test /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/mygroup1/providers/Microsoft.ContainerRegistry/registries/myregistry1
View .vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
View dynamodb-pagination-vogels.js
const vogels = require('vogels');
const Joi = require('joi');
const Person = vogels.define('Person', {
hashKey: 'id',
rangeKey: 'birthdate',
timestamps: true,
tableName: 'sandbox-caiubi',
schema: {
id: Joi.string(),
View gist:8998e71cc9c65d2c50102ba72eebe999
You could apply this policy to an IAM user to give it full access to a table named 'TABLE_NAME' and its indices, but without any delete or create permissions:
"Version": "2012-10-17",
"Statement": [
"Sid": "AllowWorkWithData",
"Effect": "Allow",
"Action": [