Skip to content

Instantly share code, notes, and snippets.

View 4383's full-sized avatar
🏝️
Vacation

Hervé Beraud 4383

🏝️
Vacation
View GitHub Profile
export OS_PROJECT_DOMAIN_NAME='Default'
export OS_USER_DOMAIN_NAME='Default'
export OS_PROJECT_NAME='admin'
export OS_USERNAME='admin'
export OS_AUTH_URL=http://192.168.24.2:5000/
export OS_AUTH_TYPE='password'
export OS_IDENTITY_API_VERSION='3'
export OS_PASSWORD=$(sudo hiera -c /etc/puppet/hiera.yaml keystone::admin_password)
@bogdando
bogdando / docker_vs_podman_run.sh
Last active February 1, 2019 10:54
Comparing the time it takes to launch containers concurrently for docker and podman runtimes
#!/bin/bash
set -e
containers_total=${1:-100}
containers_concur=${2:-10}
container_image=${3:-docker.io/library/busybox}
podman pull $container_image
docker pull $container_image
rm -f bench-jobs.txt
@Gsantomaggio
Gsantomaggio / mandatory.md
Last active May 28, 2019 09:48
mandatory

Basic Idea

The idea is to add another parameter to the function RPCCLient as:

client = oslo_messaging.RPCClient(transport, target, options={'mandatory': True})
client.call({}, 'foo', id_value=str(i), test_value="hello oslo")

Inside the function, _publish decode the option value, as:

@zaneb
zaneb / fast8.sh
Created June 20, 2019 17:12
Run flake8 against only files that have changed
#!/bin/bash
set -e
enable_env() {
local env_name="$1"
local env_dir=".tox/${env_name}"
if [ ! -d "${env_dir}" ]; then
if [ ! -f tox.ini ]; then
echo 'No tox.ini found' >&2
@mbaldessari
mbaldessari / disable-haproxy-backends.sh
Created September 18, 2019 08:57
Disables other controller haproxy backends on osp ctlplane
#!/bin/bash
set -e
# Before running this script it would be best to disable haproxy on the other nodes
# via: for i in controller-1 controller-2; do pcs resource ban haproxy-bundle $i; done
# To clear the bans: for i in controller-1 controller-2; do pcs resource clear haproxy-bundle $i; done
# Run this script as root on the single controller you want to stay active
CONF="/var/lib/config-data/puppet-generated/haproxy/etc/haproxy/haproxy.cfg"
HOST=$(hostname)
# Enable admin access to the haproxy stat socket
@basilfx
basilfx / tmux-notify.pl
Last active November 29, 2021 11:01
Irssi and tmux-notify
use strict;
use warnings;
use vars qw($VERSION %IRSSI);
use Irssi;
# Script info
$VERSION = '0.1';
%IRSSI = (
authors => 'Bas Stottelaar',
@willprice
willprice / .travis.yml
Last active August 15, 2023 17:12
How to set up TravisCI for projects that push back to github
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
before_install:
- sudo apt-get install pandoc
- gem install asciidoctor
script:
- make
after_success:
- .travis/push.sh
env:
@pnc
pnc / observer.md
Last active September 9, 2023 23:32
Using Erlang observer/appmon remotely

Using OTP's observer (appmon replacement) remotely

$ ssh remote-host "epmd -names"
epmd: up and running on port 4369 with data:
name some_node at port 58769

Note the running on port for epmd itself and the port of the node you're interested in debugging. Reconnect to the remote host with these ports forwarded:

$ ssh -L 4369:localhost:4369 -L 58769:localhost:58769 remote-host
@kenanpelit
kenanpelit / myweechat.md
Created November 9, 2016 21:45 — 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

@parsa
parsa / hexchat_external_sasl_auth.md
Last active January 17, 2024 22:44
Nickserv Commands

Generate a certificate

Note: Git Bash comes with OpenSSL

$ openssl req -x509 -new -newkey rsa:4096 -sha256 -days 730 -nodes -out freenode.pem -keyout freenode.pem
Generating a 4096 bit RSA private key
.....................................................++
............................................................................++
writing new private key to 'freenode.pem'