This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import ipaddress | |
| import re | |
| def mac2eui64(mac, prefix=None): | |
| ''' | |
| Convert a MAC address to a EUI64 address | |
| or, with prefix provided, a full IPv6 address | |
| ''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| for bucket in $(radosgw-admin bucket list | jq -r .[]); do | |
| bucket_id=$(radosgw-admin metadata get bucket:${bucket} | jq -r .data.bucket.bucket_id) | |
| marker=$(radosgw-admin metadata get bucket:${bucket} | jq -r .data.bucket.marker) | |
| for instance in $(radosgw-admin metadata list bucket.instance | jq -r .[] | grep "^${bucket}:" | grep -v ${bucket_id} | grep -v ${marker}| cut -f2 -d':'); do | |
| echo "${bucket}: ${instance}" | |
| radosgw-admin bi purge --bucket=${bucket} --bucket-id=${instance} | |
| radosgw-admin metadata rm bucket.instance:${bucket}:${instance} | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Find orphaned bucket index objects in the RGW bucket index pool | |
| # and clean them up if they do not belong to a bucket | |
| # | |
| # Author: Wido den Hollander <wido@42on.com> | |
| # | |
| INDEX_POOL=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # Use BGP+EVPN for VXLAN with CloudStack instead of Multicast | |
| # | |
| # Place this file on all KVM hypervisors at /usr/share/modifyvxlan.sh | |
| # | |
| # More information about BGP and EVPN with FRR: https://vincent.bernat.ch/en/blog/2017-vxlan-bgp-evpn | |
| # | |
| DSTPORT=4789 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Put this script in the source directory of the ipxe project | |
| # | |
| # The output ipxe-uefi.iso can be used to boot a server with iPXE | |
| # | |
| cd `dirname $0` | |
| cd src | |
| make bin-x86_64-efi/ipxe.efi | |
| cd .. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name localhost; | |
| client_max_body_size 0; | |
| proxy_buffering off; | |
| proxy_set_header Host $host; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Create a 8GB eMMC image for Tesla Model S/X MCU1 | |
| # | |
| # Example usage: ./mkteslaemmcimg.sh ./vinXXXXX.img ./develop-2019.20.2.1-16-5659e07dfd.img | |
| # | |
| set -e | |
| FIRMWARE=$2 | |
| IMAGE=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Generate a DNSSEC DS record based on the incoming DNSKEY record | |
| The DNSKEY can be found using for example 'dig': | |
| $ dig DNSKEY secure.widodh.nl | |
| The output can then be parsed with the following code to generate a DS record | |
| for in the parent DNS zone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Author: Wido den Hollander <wido@widodh.nl> | |
| # | |
| # Proxy all TCP and UDP IPv4 traffic from 192.168.100.230 to 10.0.100.50 | |
| # | |
| # This can be used as a (temporary) proxy when you want to renumber a machine and want | |
| # to make sure it's still available on it's old address | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Simple script to change lights on Philips Hue using cURL | |
| # | |
| # Source: http://hkionline.net/posts/using-phillips-hue-from-the-command-line | |
| # | |
| # Author: Wido den Hollander <wido@denhollander.io> | |
| # | |
| # YES! Philips Hue also talks IPv6! :-) |
NewerOlder