Skip to content

Instantly share code, notes, and snippets.

View ilosamart's full-sized avatar

Fábio Tramasoli ilosamart

View GitHub Profile
@ilosamart
ilosamart / pedantically_commented_playbook.yml
Created January 8, 2016 16:21 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@ilosamart
ilosamart / netflix-codes.txt
Created January 18, 2016 17:29
Netflix categories codes
Action & Adventure: 1365
Action Comedies: 43040
Action Sci-Fi & Fantasy: 1568
Action Thrillers: 43048
Adult Animation: 11881
Adventures: 7442
African Movies: 3761
Alien Sci-Fi: 3327
Animal Tales: 5507
Anime: 7424
# from https://github.com/docker/docker/blob/master/pkg/namesgenerator/names-generator.go
name=( admiring adoring agitated amazing angry awesome backstabbing berserk big boring clever cocky compassionate condescending cranky desperate determined distracted dreamy drunk ecstatic elated elegant evil fervent focused furious gigantic gloomy goofy grave happy high hopeful hungry insane jolly jovial kickass lonely loving mad modest naughty nauseous nostalgic pedantic pensive prickly reverent romantic sad serene sharp sick silly sleepy small stoic stupefied suspicious tender thirsty tiny trusting )
surname=( albattani allen almeida archimedes ardinghelli aryabhata austin babbage banach bardeen bartik bassi bell bhabha bhaskara blackwell bohr booth borg bose boyd brahmagupta brattain brown carson chandrasekhar colden cori cray curie darwin davinci dijkstra dubinsky easley einstein elion engelbart euclid euler fermat fermi feynman franklin galileo gates goldberg goldstine goldwasser golick goodall hamilton hawking hei
@ilosamart
ilosamart / replace-debian-with-arch.txt
Created January 29, 2016 13:25 — forked from m-ou-se/replace-debian-with-arch.txt
Instructions to replace a live Debian installation with Arch
# Download latest archlinux bootstrap package, see https://www.archlinux.org/download/
wget http://ftp.nluug.nl/os/Linux/distr/archlinux/iso/2016.01.01/archlinux-bootstrap-2016.01.01-x86_64.tar.gz
# Make sure you'll have enough entropy for pacman-key later.
apt-get install haveged
# Install the arch bootstrap image in a tmpfs.
mount -t tmpfs none /mnt
cd /mnt
tar xvf ~/archlinux-bootstrap-2016.01.01-x86_64.tar.gz --strip-components=1
- ansible_version: 1.9
author: Fábio Tramasoli
subject: How and why I'm doin' Ansible playbooks
topics:
- why not chef or puppet
- general concepts:
- inventory
- playbooks
- roles
- conventions (lots of conventions)
@ilosamart
ilosamart / main.py
Created July 4, 2016 18:56 — forked from gear11/main.py
Simple Python proxy server based on Flask and Requests. See: http:/python-proxy-server/gear11.com/2013/12/python-proxy-server/
"""
A simple proxy server. Usage:
http://hostname:port/p/(URL to be proxied, minus protocol)
For example:
http://localhost:8080/p/www.google.com
"""
version: '2'
#client local machine:
# consul agent -bind=172.18.233.1 -client=0.0.0.0 -retry-join=172.18.233.20 -data-dir /tmp/data -ui -recursor=127.0.1.1
#client dns config:
# iptables -t nat -I PREROUTING -p udp -m udp --dport 53 -j REDIRECT --to-ports 8600
# iptables -t nat -I PREROUTING -p tcp -m tcp --dport 53 -j REDIRECT --to-ports 8600
# iptables -t nat -I OUTPUT -d localhost -p udp -m udp --dport 53 -j REDIRECT --to-ports 8600
# iptables -t nat -I OUTPUT -d localhost -p tcp -m tcp --dport 53 -j REDIRECT --to-ports 8600
Executing bootstrap tasks
OpenJDK Runtime Environment 1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14
Product user.products.pjrs.eclipse.neon.neon
Bundle org.eclipse.oomph.setup 1.6.0.v20161125-0947, build=2765, branch=67300b4badfd07350c1a987bfbc2fafc3a4c0016
Bundle org.eclipse.oomph.setup.core 1.6.0.v20161128-0928, build=2765, branch=67300b4badfd07350c1a987bfbc2fafc3a4c0016
Bundle org.eclipse.oomph.setup.installer 1.6.0.v20161114-1007, build=2765, branch=67300b4badfd07350c1a987bfbc2fafc3a4c0016
Bundle org.eclipse.oomph.setup.p2 1.6.0.v20161019-0656, build=2765, branch=67300b4badfd07350c1a987bfbc2fafc3a4c0016
Performing P2 Director (PJRS Eclipse Neon (Neon))
Offline = false
Mirrors = false
<?xml version="1.0" encoding="UTF-8"?>
<setup:Product
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
xmlns:setup.p2="http://www.eclipse.org/oomph/setup/p2/1.0"
name="pjrs.eclipse.neon"
label="PJRS Eclipse Neon">
<annotation

Keybase proof

I hereby claim:

  • I am ilosamart on github.
  • I am ilosamart (https://keybase.io/ilosamart) on keybase.
  • I have a public key whose fingerprint is 601D 8CC0 465C 60F1 E4DA 58AE D2BA A05F BABE 91A1

To claim this, I am signing this object: