Skip to content

Instantly share code, notes, and snippets.

View jorandradefig's full-sized avatar

Jorge Andrade jorandradefig

View GitHub Profile
@jorandradefig
jorandradefig / gist:a9a6ce2bcac7d0b358781545fa385084
Created March 6, 2018 21:38
Create new EC2 instance with Ansible
---
- name: Create new EC2 instance
hosts: localhost
connection: local
gather_facts: False
vars:
aws_access_key: "{{ lookup('env','AWS_ACCESS_KEY_ID') }}"
aws_secret_key: "{{ lookup('env','AWS_SECRET_ACCESS_KEY') }}"
ec2_keypair: "{{ lookup('env','EC2_KEY_PAIR') }}"
@jorandradefig
jorandradefig / gist:6a2f810c2f2d873530e470aac59c6d4e
Created March 6, 2018 21:32
Install Docker Compose for Ubuntu
From: https://docs.docker.com/compose/install/#install-compose
Download the latest version
sudo curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
Apply executable permissions to the binary
sudo chmod +x /usr/local/bin/docker-compose
Test the installation
docker-compose --version
@jorandradefig
jorandradefig / gist:dd00d2bfd03c10da704088c41b2260f1
Last active March 6, 2018 21:26
Install Docker CE for Ubuntu
From: https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository
SET UP THE REPOSITORY
Update the apt package index
sudo apt-get update
Install packages to allow apt to use a repository over HTTPS
sudo apt-get install \
apt-transport-https \

localhost

In Terminal:

Create dump

pg_dump -h 127.0.0.1 -p 5432 -U <user> -W -F t <database> | gzip > <gzipfile>.gz

Install

brew install ansible

Dart SDK

brew tap dart-lang/dart
brew install dart --with-content-shell --with-dartium
git clone https://github.com/onlyangel/EmiLeanProPlatform.git

cd EmiLeanProPlatform

Google Cloud SDK

brew cask install google-cloud-sdk

gcloud auth login

gcloud components update

gcloud components install app-engine-go
@jorandradefig
jorandradefig / variablesquiz.md
Created August 21, 2017 01:42
Variables Quiz
  1. Crea un objeto restaurante que tenga las siguientes propiedades: nombre, direccion, telefono, website, platillos, postres y menu del día.
  1. Crea una clase Humano que imprima su nombre y su edad
  2. Crea tres objetos diferentes de la clase Humano
  3. Crea una clase Mexicano que herede de la clase Humano e imprima su nacionalidad
  4. Crea tres objetos diferentes de la clase Mexicano
@jorandradefig
jorandradefig / Quiz 2
Created August 14, 2017 13:45
quiz2.md
1. Declara un array de objetos `animal` que tenga 5 propiedades (nombre, especie, número de extremidades, edad y nacionalidad) cada uno.
2. Después de creado el array, haz una función que añada a cada objeto del array una propiedad `gènero`.