Skip to content

Instantly share code, notes, and snippets.

View jriguera's full-sized avatar

José Riguera Lopez jriguera

View GitHub Profile
@jriguera
jriguera / haproxy.cfg
Created October 10, 2016 13:24
Haproxy for Multimaster MySQL cluster
#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
# to have these messages end up in /var/log/haproxy.log you will
# need to:
#
# 1) configure syslog to accept network log events. This is done
# by adding the '-r' option to the SYSLOGD_OPTIONS in
# /etc/sysconfig/syslog
@jriguera
jriguera / email_notify.py
Last active February 20, 2023 09:09
Email from Python with Jinja2
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Python 3 and compatibility with Python 2
from __future__ import unicode_literals, print_function
import os
import sys
import re
import logging
@jriguera
jriguera / k8s_crd.md
Created December 25, 2022 18:49 — forked from pydevops/k8s-crd.md
k8s crd operator

Some useful resources regarding Kubernetes Operators, CRDs, etc.

@jriguera
jriguera / delete-dockerhub-images.sh
Last active May 26, 2022 05:27
Delete Docker images on DockerHub
#!/bin/bash
# Based on kizbitz/dockerhub-v2-api-organization.sh at https://gist.github.com/kizbitz/175be06d0fbbb39bc9bfa6c0cb0d4721
# Example for the Docker Hub V2 API
# Returns all images and tags associated with a Docker Hub organization account.
# Requires 'jq': https://stedolan.github.io/jq/
# set username, password, and organization
UNAME=""
UPASS=""
@jriguera
jriguera / app_instance_identity_intro_to_envoy.md
Created September 21, 2020 08:25 — forked from nikhilsuvarna/app_instance_identity_intro_to_envoy.md
Application Instance Identity and Intro to Envoy in PCF
@jriguera
jriguera / compile_ncid.sh
Last active May 30, 2020 22:36
NCID on raspberry pi (arch linux)
# Install compile requirements
pacman -S gcc make
# Install lib requirements for ncid
pacman -S libpcap
# Download
curl http://heanet.dl.sourceforge.net/project/ncid/ncid/1.2/ncid-1.2-src.tar.gz -o ncid-1.2-src.tar.gz
# Compile
@jriguera
jriguera / openvpn-new-client.sh
Created March 9, 2015 01:00
Create a new openvpn client
#!/bin/bash
# Create client for OpenVPN using easy-rsa
# create p12 certificate
PREFIX=lu
BASE_DIR="/etc/openvpn"
DEST_DIR="$BASE_DIR/clients"
EASY_DIR="$BASE_DIR/easy-rsa"
if [ "$#" -ne 1 ]; then
@jriguera
jriguera / 00_openstack_vmware.md
Last active February 5, 2019 13:52
OpenStack and VMware integration