Skip to content

Instantly share code, notes, and snippets.

View evrardjp's full-sized avatar

Jean-Philippe Evrard evrardjp

View GitHub Profile
@evrardjp
evrardjp / MySQL network benchmark
Created July 8, 2021 07:04 — forked from stickystyle/MySQL network benchmark
Simple script to monitor the network latencey between app servers and DB servers
#!/bin/env python
import timeit
loops = 1000
setup = """
import MySQLdb
db = MySQLdb.connect(host="remotedb.example.com",
read_default_file="/root/.my.cnf",
@evrardjp
evrardjp / README.md
Created November 15, 2019 11:21 — forked from adambom/README.md
Backup Kubernetes Cluster State

Run this in order to backup all you k8s cluster data. It will be saved in a folder bkp. To restore the cluster, you can run kubectl apply -f bkp.

Please note: this recovers all resources correctly, including dynamically generated PV's. However, it will not recover ELB endpoints. You will need to update any DNS entries manually, and manually remove the old ELB's.

Please note: This has not been tested with all resource types. Supported resource types include:

  • services
  • replicationcontrollers
  • secrets
  • deployments
  • horizontal pod autoscalers
graham@jump:~/repos/github/phhusson/quassel-irssi/core/lib$ git diff
diff --git a/getters.c b/getters.c
index e6bb564..51da7b7 100644
--- a/getters.c
+++ b/getters.c
@@ -160,6 +160,8 @@ void get_variant_t(char **buf, int type) {
case 16:
get_date(buf);
break;
+ case 22:
@evrardjp
evrardjp / supervisord conf for uWSGI Emperor + FastRouter
Created April 24, 2018 21:51 — forked from alb-i986/supervisord conf for uWSGI Emperor + FastRouter
My supervisord config for uWSGI Emperor + Fast Router. Please notice that the priority for the FastRouter must be greater than the one for the Emperor.
[program:uwsgi-emperor]
command=/usr/local/bin/uwsgi --emperor /etc/uwsgi/sites-enabled/ --pidfile /var/run/uwsgi/uwsgi-emperor.pid --auto-procname --emperor-stats-server /var/run/uwsgi/uwsgi-emperor-stats.sock
stdout_logfile=/var/log/uwsgi/%(program_name)s.log
redirect_stderr=true ; redirect proc stderr to stdout (default false)
autostart=true ; start at supervisord start (default: true)
autorestart=unexpected ; whether/when to restart (default: unexpected)
priority=998 ; the relative start priority (default 999)
@evrardjp
evrardjp / myweechat.md
Created April 24, 2018 21:50 — forked from pascalpoitras/config.md
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

Enable mouse support

/mouse enable

Encrypted password in sec.conf

@evrardjp
evrardjp / user_variables.yml
Created April 10, 2018 11:45 — forked from logan2211/user_variables.yml
multi-region OSA POC
service_region: regionTwo
master_region_keystone_address: "10.53.3.2"
keystone_service_region: regionOne
keystone_service_adminuri: "{{ keystone_service_adminuri_proto }}://{{ master_region_keystone_address }}:{{ keystone_admin_port }}"
keystone_service_internaluri: "{{ keystone_service_internaluri_proto }}://{{ master_region_keystone_address }}:{{ keystone_service_port }}"
# Make sure your keystone_auth_admin_password in user_secrets for the second region matches the password from regionOne
# These settings avoid username collisions when using the same keystone
# deployment across multiple regions.
@evrardjp
evrardjp / openstack_user_config.yml
Last active February 12, 2018 11:29
working user config
---
cidr_networks:
container: 10.40.100.0/22
storage: 10.40.244.0/22
tunnel: 10.40.240.0/22
used_ips:
- "10.40.100.2,10.40.100.50"
- "10.40.240.1,10.40.240.50"
- "10.40.244.1,10.40.244.50"
@evrardjp
evrardjp / 00-setup.sh
Created November 17, 2017 12:59 — forked from odyssey4me/00-setup.sh
Setup a basic nodepool host using a single VM and localhost
# prep host
apt update
apt purge nano
apt install git vim tmux fail2ban
# prep ssh key
key_path="${HOME}/.ssh"
key_file="${key_path}/id_rsa"
mkdir -p ${key_path}
chmod 700 ${key_path}
@evrardjp
evrardjp / bootstrap_host_overrides.yml
Created August 3, 2017 16:49 — forked from logan2211/bootstrap_host_overrides.yml
OSA CI Configuration for unbound + ceph + calico
---
# Copyright 2016, Logan Vig <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
#!/bin/bash
# This is a companion script to https://github.com/konstantin-kelemen/arduino-amiibo-tools
# The original post this was crafted for was https://games.kel.mn/en/create-amiibo-clones-with-arduino/
# For more info go to https://games.kel.mn/en/companion-script-to-simplify-amiibo-cloning-with-arduino/
#requirements:
#sha1sum (part of coreutils)
#xxd (part of vim)
#hexdump
#amiitool (https://github.com/socram8888/amiitool)