Skip to content

Instantly share code, notes, and snippets.

View andresvia's full-sized avatar
💭
adsking

Andres Villarroel andresvia

💭
adsking
View GitHub Profile
@andresvia
andresvia / terraform.tfvars
Last active July 13, 2018 21:37
terragrunt repro
terragrunt {
terraform {
source = "git::https://gist.github.com/e193045664d62fbf8b1b93fd21e5914c.git//?ref=master"
}
remote_state {
backend = "s3"
config {
bucket = "t-villa-tg-0162"
dynamodb_table = "t-villa-tg-0162"
encrypt = true
@andresvia
andresvia / README.md
Last active July 9, 2018 21:02
gogradle-232
# w: /tmp/gogradle-232
gradle clean build

> Configure project :
Found go 1.10.3 in /Users/andres/.gimme/versions/go1.10.3.darwin.amd64/bin/go, use it.

> Task :prepare
Use project GOPATH: /private/tmp/gogradle-232/.gogradle/project_gopath
@andresvia
andresvia / README.md
Last active January 29, 2018 14:42
hello-server

hello

[root@hello ~]# puppet agent -t 
Info: Using configured environment 'master'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for hello.192.168.12.101.xip.io
@andresvia
andresvia / stdout
Last active January 29, 2018 13:53
vagrant up --provision
vagrant up --provision
# variables que afectan la ejecución
# http_proxy =
# virtualbox_ram = 4096
# libvirt_ram = 4096
# inicializando módulos
# actualizando módulos
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'centos/7' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
@andresvia
andresvia / foo.md
Last active February 7, 2017 17:29

screenshot

@andresvia
andresvia / .drone.yaml
Created January 4, 2017 13:26
golang + drone full example
build:
construyendo_1:
image: golang
commands:
- go get ./...
- go test ./...
- go build -o miprograma
publish:
publicando_1:
@andresvia
andresvia / tunnelme.md
Last active January 5, 2017 23:46
tunnelme - Split tunnel connections to a specific host or IP over a certain gateway

Situation:

Your VPN does not automatically set split tunnel for your connection to some host, maybe the ipaddress of the host changes over time, like an AWS ELB, and network admins can't set split tunnel rules on changing addresses.

Requirements:

User must be able to run:

sudo route add -host "$dst" "$tunnel"
#!/bin/bash
set -e -u
echo "i'm not root right? whoami $(whoami)"
echo right
sudo su << 'EOF'
echo "i'm root right? whoami = $(whoami)"
EOF
#!/bin/bash
set -e -u
echo -n "read a var: "
read -r a_var
echo "you typed ${a_var}"