Skip to content

Instantly share code, notes, and snippets.

Avatar

José Riguera Lopez jriguera

View GitHub Profile
@jriguera
jriguera / k8s_crd.md
Created December 25, 2022 18:49 — forked from pydevops/k8s_crd.md
k8s crd operator
@jriguera
jriguera / haproxy.cfg
Created October 10, 2016 13:24
Haproxy for Multimaster MySQL cluster
View haproxy.cfg
#---------------------------------------------------------------------
# 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 / delete-dockerhub-images.sh
Last active May 26, 2022 05:27
Delete Docker images on DockerHub
View delete-dockerhub-images.sh
#!/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 / email_notify.py
Last active January 14, 2022 16:53
Email from Python with Jinja2
View email_notify.py
#!/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 / anyconnect.sh
Created September 21, 2020 08:27
AnyConnect VPN up/down single command + service cleanup
View anyconnect.sh
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
readonly _CISCO_VPN="/opt/cisco/anyconnect/bin/vpn"
readonly _GREEN='\033[0;32m'
readonly _RED='\033[0;31m'
readonly _NC='\033[0m'
@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
View app_instance_identity_intro_to_envoy.md
@jriguera
jriguera / compile_ncid.sh
Last active May 30, 2020 22:36
NCID on raspberry pi (arch linux)
View compile_ncid.sh
# 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
View openvpn-new-client.sh
#!/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