Skip to content

Instantly share code, notes, and snippets.

View thiagocaiubi's full-sized avatar
😄

Thiago Caiubi thiagocaiubi

😄
View GitHub Profile

Keybase proof

I hereby claim:

  • I am thiagocaiubi on github.
  • I am thiagocaiubi (https://keybase.io/thiagocaiubi) on keybase.
  • I have a public key ASAHT01Jv1rg0eCIYqQwRtkIMaS0TnOVKU6pDTUXOWav2Qo

To claim this, I am signing this object:

@thiagocaiubi
thiagocaiubi / main_test.go
Last active February 23, 2018 12:06
A boilerplate for Go table-driven tests running in parallel
package main_test
import "testing"
func TestMain(t *testing.T) {
testCases := []struct {
name string
}{
{
name: "test name",
@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"}
☁ /tmp terraform init
Initializing provider plugins...
- Checking for available provider plugins on https://releases.hashicorp.com...
- 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
☁ /tmp cat xpto.tf
terraform {
version = "0.10.7"
}
provider "azurerm" {
version = "0.3"
}
resource "azurerm_resource_group" "test" {
# 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
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
website/source/docs/providers/az
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
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(),
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": [
"dynamodb:*"