Skip to content

Instantly share code, notes, and snippets.

carles san agustin carlessanagustin

Block or report user

Report or block carlessanagustin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
build_names = []
build_names.append(dict(name='build_id', branch='master', slaves=['bbslave'],
scheduler=['single', 'force', 'periodic', 'nightly']))
build_names.append(dict(name='branch_id', branch='branch_id', slaves=['bbslave'],
scheduler=['single', 'periodic']))
build_names.append(dict(name='branch_idm', branch='master', slaves=['bbslave'],
scheduler=['single', 'force','periodic']))
print ''
print 'original: ', build_names
carlessanagustin / static-network.ps1
Last active Aug 29, 2015
(PowerShell) Request static IP configuration and place it into a text file
View static-network.ps1
## An A-Z Index of Windows PowerShell 2.0 commands:
do {
$ip = Read-Host "Enter IP address"
$mask = Read-Host "Enter mask"
$gw = Read-Host "Enter default gateway"
Write-Host 'Is this information correct? IP $ip MASK $mask GW $gw'
$confirm = Read-Host "yes/no"
}while ($confirm -notlike "yes")
carlessanagustin / nginx.conf
Last active Aug 29, 2015
Nginx app frontend / Load balancer / Static assets caching (not tested)
View nginx.conf
# Number of worker processes. Set it to the number of available CPU cores as a good start value or use 'auto' to autodetect it
worker_processes 4;
# User and group used by worker processes
user www-data www-data;
# Skip superfluous info in the main error log file
error_log /var/log/nginx/error_log error;
# Limit number of files a worker process can open
View nginx-min.conf
server {
listen 80;
charset utf-8;
#index index.html index.htm;
# myApp at port 8010
location /myApp {
return 301 http://$host:8010$request_uri;
carlessanagustin / hyper-v-snapshots.ps1
Last active Aug 29, 2015
Working with Hyper-V & Snapshots/Checkpoints via PowerShell
View hyper-v-snapshots.ps1
# --- VM ---
## get hyper-v info
Get-VMHost -ComputerName computer_name | format-list *
#3 get VMs info
Get-VM -ComputerName computer_name
## get VM info
Get-VM -ComputerName computer_name -name vm_name
carlessanagustin / nginx-reverse-proxy.conf
Last active Aug 29, 2015
Nginx simple reverse proxy
View nginx-reverse-proxy.conf
upstream app_server {
server fail_timeout=0;
server {
listen 80;
location / {
proxy_pass http://app_server;
carlessanagustin /
Last active Aug 29, 2015
For unattended installations in Debian Linux environments
carlessanagustin /
Created Oct 3, 2015
AWS CloudFormation mini-demo
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "launch an instance.",
"Resources": {
"Ec2Instance": {
"Type": "AWS::EC2::Instance",
"Properties": {
"ImageId": "ami-d05e75b8",
"InstanceType": "t2.micro"
carlessanagustin /
Last active Oct 14, 2015
HashiCorp Terraform AWS and DOCKER up-n-running
############ AWS ############
provider "aws" {
access_key = "${var.access_key}"
secret_key = "${var.secret_key}"
# access_key = "lalalalalalalalalala"
# secret_key = "lalalalalalalalalala"
region = "us-east-1"
carlessanagustin / AdminProductsController.php
Last active Oct 24, 2015
Adding a new column to Prestashop 1.6 admin product list. Changes are indicated with "START:" and "END:". 2 files included in this Gist.
View AdminProductsController.php
* 2007-2015 PrestaShop
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
You can’t perform that action at this time.