Skip to content

Instantly share code, notes, and snippets.

View brpaz's full-sized avatar

Bruno Paz brpaz

View GitHub Profile
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 11, 2026 16:34
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@lukemadera
lukemadera / docker-create-swarm.sh
Created September 25, 2015 15:56
jwilder/nginx-proxy using Compose + Swarm + Machine attempt 1
#!/bin/bash
set -e
if [ -z "$DIGITALOCEAN_ACCESS_TOKEN" ]; then
echo >&2 "ERROR: You must export DIGITALOCEAN_ACCESS_TOKEN"
exit 1
fi
docker pull swarm > /dev/null
@lusis
lusis / README.md
Last active September 14, 2020 17:47
terraform template to generate serverspec properties

This uses terraform's template_file resource to generate a yaml properties file for serverspec to use.

  • create the Rakefile in your terraform project root
  • create a spec directory and put spec_helper.rb in it
  • create the templates/properties.tmpl.yml file
  • create the serverspec.tf
  • terraform apply

tests

Tests will be matched based on roles defined for a given node.

/**
* Required Variables.
*/
variable "name" {}
variable "port" {}
variable "elb_security_group" {}
variable "elb_subnets" {}
@thoroc
thoroc / sf2-set-permissions.sh
Created December 14, 2015 14:06
Bash script to automatically set the permissions for Symfony2 based on the official docs (current version 2.8)
#!/bin/bash
#
# script to automatically set the permission for the cache and logs folder
# for a new symfony2 project.
# original code taken from the documentation pages:
# http://symfony.com/doc/current/book/installation.html
BASEFOLDER="";
if [ "$1" != "" ]; then
BASEFOLDER="$1";
@chalasr
chalasr / EnhancedRepository.php
Last active September 26, 2023 00:59
Implements a custom EntityRepository using Factory in Symfony2.6+
<?php
namespace App\Util\Doctrine\Repository;
use App\Util\Doctrine\Entity\AbstractEntity;
use Doctrine\Common\Persistence\ObjectRepository;
use Doctrine\ORM\EntityRepository;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException;
@sidneys
sidneys / nvm_node_updater.sh
Last active July 25, 2020 13:54
Node & NPM Global Updater: Updates NodeJS, NPM and all global Packages to 'latest' in one step
#!/bin/bash
# NVM_NODE_UPDATER
# v2.0.0
#
# Makes keeping NVM-managed, global NodeJS installations up-to-date a breeze.
# First, the global NodeJS installation is updated to 'latest'.
# Second, all global NPM packages are migrated, then also updated to 'latest'.
# Requires the Node Version Manager (https://github.com/creationix/nvm).
#
@QuantumGhost
QuantumGhost / example.puml
Last active June 18, 2025 14:09
A simple template for PlantUML to draw ER diagram.The basic idea comes from http://plantuml.sourceforge.net/qa/?qa=331/database-modeling
@startuml
' uncomment the line below if you're using computer with a retina display
' skinparam dpi 300
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >>
' we use bold for primary key
' green color for unique
' and underscore for not_null
!define primary_key(x) <b>x</b>
!define unique(x) <color:green>x</color>
!define not_null(x) <u>x</u>
@rgcs88
rgcs88 / README.md
Last active December 30, 2016 09:44
dnsdock working on systemd for a dummy guy like me :|

Hey.

If you didin't get the instructions on the git repo of DnsDock, let's take a step back.

Follow these steps to install DNSDock on your Ubuntu machine:

1. Set BIP (bridge ip) for docker0 interface.

It's better to set an address, cause docker can change addresses between versions. We need to edit /lib/systemd/system/docker.service

@jakzal
jakzal / bin > drun
Last active March 31, 2020 08:29
Docker with Symfony, RabbitMQ, Nginx
#!/bin/bash
set -e
set -u
set -o pipefail
COMMAND=${1:-"help"}
MACHINE_NAME=myapp
DENV=${DENV:-"dev"}