Skip to content

Instantly share code, notes, and snippets.

View carlessanagustin's full-sized avatar

carles san agustin carlessanagustin

View GitHub Profile
@carlessanagustin
carlessanagustin / hyper-v-snapshots.ps1
Last active August 29, 2015 14:17
Working with Hyper-V & Snapshots/Checkpoints via PowerShell
# --- 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
carlessanagustin / disable-out-of-stock.sql
Created March 25, 2015 11:22
How to automatically disable out of stock products in PrestaShop
# from http://mypresta.eu/en/art/tips-and-tricks/how-to-disable-out-of-stock-product.html
# trigger name: active2disable_out-of-stock
# table: ps_stock_available
# time: AFTER
# event: UPDATE
@carlessanagustin
carlessanagustin / update-playbook.sh
Last active June 9, 2021 16:59
Quick Bash script for running Ansible Playbooks
#!/usr/bin/env bash
########################## REQUIREMENTS
# sudo apt-get install ansible unzip
########################## VARIBLES
PLAYBOOK_GZ="playbook.zip"
PLAYBOOK_FILE="update.yml"
INVENTORY_FILE="all"
EXTRA_ARGS="--list-tasks --list-hosts"
@carlessanagustin
carlessanagustin / nginx-reverse-proxy.conf
Last active August 29, 2015 14:21
Nginx simple reverse proxy
upstream app_server {
server 172.17.0.1:8080 fail_timeout=0;
}
server {
listen 80;
location / {
proxy_pass http://app_server;
}
@carlessanagustin
carlessanagustin / install_lamp.sh
Last active February 28, 2018 17:00 — forked from rrosiek/install_mysql.sh
Vagrant provision script for php, Apache, MySQL, phpMyAdmin, Laravel, and javascript helpers. Outputs nearly everything to /dev/null since "quiet" on most commands is still noisy.
#!/usr/bin/env bash
# Variables
APPENV=local
DBHOST=localhost
DBNAME=dbname
DBUSER=dbuser
DBPASSWD=test123
echo -e "\n--- Mkay, installing now... ---\n"
@carlessanagustin
carlessanagustin / jenkins-plugins.md
Last active September 11, 2020 18:45
This is a list of interesting plugins to use with Jenkins

Jenkins plugins

You can read more about each plugin using the SEARCH box at Jenkins homepage.

  • ChuckNorris Plugin: Displays a picture of Chuck Norris (instead of Jenkins the butler) and a random Chuck Norris 'The Programmer' fact on each build page.

Maintenance

  • thinBackup: This plugin simply backs up the global and job specific configurations (not the archive or the workspace).
  • JobConfigHistory Plugin: Saves copies of all job and system configurations.
@carlessanagustin
carlessanagustin / Debconf.md
Last active August 2, 2023 14:07
For unattended installations in Debian Linux environments
@carlessanagustin
carlessanagustin / terraform.tf.json
Last active October 14, 2015 15:28
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
carlessanagustin / launch_an_instance.cf
Created October 3, 2015 08:38
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
carlessanagustin / README.md
Last active January 13, 2019 15:29
Testing: Install Consul in Vagrant machines

forked from https://github.com/hashicorp/consul/tree/master/demo/vagrant-cluster

Vagrant Consul Demo

This demo provides a very simple Vagrantfile that creates 3 nodes, one at "172.20.20.10", "172.20.20.11" and "172.20.20.12". Both are running a standard Ubuntu distribution and the script will install Consul and Web UI in all of them.

To get started, you can start the cluster by just doing: