Skip to content

Instantly share code, notes, and snippets.

View brpaz's full-sized avatar

Bruno Paz brpaz

View GitHub Profile
@brpaz
brpaz / config.yml
Created October 2, 2015 18:26
Parse YAML from bash with sed and awk.
development:
adapter: mysql2
encoding: utf8
database: my_database
username: root
password:
apt:
- somepackage
- anotherpackage
@brpaz
brpaz / .elasticsearch_cheat_sheet.md
Last active May 2, 2024 02:30
ElasticSearch cheat cheat

ElasticSearch cheat sheet

@brpaz
brpaz / nginx_ssl_cert.sh
Created May 2, 2015 09:49 — forked from jessedearing/gist:2351836
Create self-signed SSL certificate for Nginx #ssl #nginx
#!/bin/bash
echo "Generating an SSL private key to sign your certificate..."
openssl genrsa -des3 -out myssl.key 1024
echo "Generating a Certificate Signing Request..."
openssl req -new -key myssl.key -out myssl.csr
echo "Removing passphrase from key (for nginx)..."
cp myssl.key myssl.key.org
openssl rsa -in myssl.key.org -out myssl.key
@brpaz
brpaz / ssl_certificate_generator.sh
Created May 2, 2015 09:47 — forked from bradland/gencert.sh
Bash script for generating an ssl certificate #ssl
#!/bin/bash
# Bash shell script for generating self-signed certs. Run this in a folder, as it
# generates a few files. Large portions of this script were taken from the
# following artcile:
#
# http://usrportage.de/archives/919-Batch-generating-SSL-certificates.html
#
# Additional alterations by: Brad Landers
# Date: 2012-01-27
@brpaz
brpaz / .ansible_dev_environment_sample.md
Last active February 2, 2019 10:18 — forked from perrygeo/TODO
#ansible playbook for a full dev environment

TODO

implement security measures git config config files full sublimetext config set up openvpn rdesktop and network drive to terra set up evolution RStudio

@brpaz
brpaz / terraform-2tier-vpc
Last active August 29, 2015 14:17 — forked from bluemalkin/terraform-2tier-vpc
Terraform 2 tier VPC with nat #terraform #infrastucture
# define some variables
variable "aws_ubuntu_ami" {
default = "ami-972444ad"
}
variable "aws_keypair" {
default = "xxxx"
}
# AWS account details
@brpaz
brpaz / README.md
Last active August 29, 2015 14:17 — forked from andyshinn/README.md
Terraform, CoreOS and DigitalOcean #devops #terraform #infrastucture

Terraform, CoreOS, and Digital Ocean

Let's use Terraform to easily get a CoreOS cluster up on Digital Ocean. In this example we will get a 5 node CoreOS cluster up and running on the Digital Ocean 8GB size.

Install Terraform

Grab a copy of Terraform for your platform from http://www.terraform.io/downloads.html. Follow the instructions at http://www.terraform.io/intro/getting-started/install.html by getting Terraform in your PATH and testing that it works.

Digital Ocean API Key

@brpaz
brpaz / rails_models_cheatsheet.md
Last active August 29, 2015 14:17 — forked from rstacruz/index.md
Rails models cheatsheet #rails #ruby

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

@brpaz
brpaz / phpspec_cheatsheet.md
Last active August 29, 2015 14:15 — forked from pedroborges/phpspec_cheatsheet.md
From Marcello Duarte's PhpSpec 2.0 ilustrated by examples slides (http://pt.slideshare.net/marcello.duarte/phpspec-20-ilustrated-by-examples) #php #phpspec #cheatsheet

PhpSpec 2.0 Cheat Sheet

Object: $result ($this)

Expectation: should or shouldNot

Matcher: Be...()

Types of Matchers: