Skip to content

Instantly share code, notes, and snippets.

View jamesdube's full-sized avatar
🛰️
To the moon

James Dube jamesdube

🛰️
To the moon
View GitHub Profile
@jamesdube
jamesdube / Build_seed_iso
Created November 12, 2021 20:57 — forked from asvignesh/Build_seed_iso
Samples to create a cloud-init configuration ISO.
$ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data
@jamesdube
jamesdube / ansible-group-ips.yml
Created December 14, 2021 08:00
Extract all ip's from an ansible group
- hosts: all
name: get group ips in one line
gather_facts: false
vars:
all_servers_ip: "{{groups['all'] | map('extract',hostvars,['ansible_ssh_host']) | join(',') }}"
tasks:
- debug:
msg: "{{all_servers_ip}}"
package main
import (
"fmt"
"time"
"github.com/tsenart/vegeta/lib"
)
func testRate(rate int, sla time.Duration) bool {
@jamesdube
jamesdube / README.md
Created March 18, 2022 16:44 — forked from int128/README.md
Example of Envoy TCP Proxy
@jamesdube
jamesdube / mysql-docker.sh
Created December 31, 2024 02:18 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE