Skip to content

Instantly share code, notes, and snippets.

View geek182's full-sized avatar

Leandro Azevedo geek182

View GitHub Profile
@geek182
geek182 / www.conf
Created November 5, 2017 01:18 — forked from evansolomon/www.conf
PHP-FPM config
; Start a new pool named 'www'.
; the variable $pool can we used in any directive and will be replaced by the
; pool name ('www' here)
[www]
; Per pool prefix
; It only applies on the following directives:
; - 'slowlog'
; - 'listen' (unixsocket)
; - 'chroot'
@geek182
geek182 / vim_cheatsheet.md
Created September 6, 2017 01:57 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@geek182
geek182 / nginx.conf
Created June 5, 2017 18:36 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@geek182
geek182 / boto3_hands_on.md
Created March 16, 2017 14:53 — forked from iMilnb/boto3_hands_on.md
Programmatically manipulate AWS resources with boto3 - a quick hands on

boto3 quick hands-on

This documentation aims at being a quick-straight-to-the-point-hands-on AWS resources manipulation with [boto3][0].

First of all, you'll need to install [boto3][0]. Installing it along with [awscli][1] is probably a good idea as

  • [awscli][1] is boto-based
  • [awscli][1] usage is really close to boto's
@geek182
geek182 / hello_world_playbook.py
Created November 17, 2016 19:31 — forked from rm-you/hello_world_playbook.py
Ansible Playbook hello_world using Ansible 2.0 API
from ansible.cli import CLI
from ansible.executor import playbook_executor
from ansible import inventory
from ansible.parsing import dataloader
from ansible import vars
HOSTS = ['127.0.0.1']
PLAYBOOK = "/tmp/hello.yml"
REMOTE_USER = "user"
SSH_KEY = "/home/user/.ssh/id_rsa"
@geek182
geek182 / ansible_api_playbook.py
Created November 17, 2016 19:12 — forked from viper233/ansible_api_playbook.py
Example using Ansible API 2.0 to run a playbook
#!/usr/bin/env python
# stolen from http://stackoverflow.com/questions/27590039/running-ansible-playbook-using-python-api
import os
import sys
from collections import namedtuple
from ansible.parsing.dataloader import DataLoader
from ansible.vars import VariableManager
from ansible.inventory import Inventory