This file contains 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
python3 -c "import random; import string; print(''.join(random.choice(string.ascii_lowercase) for i in range(10)))" |
This file contains 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 Tesla MCU1 in factory mode | |
# | |
# Call over diagnostics port with seceth enabled | |
# | |
# Reboot MCU afterwards | |
# | |
VALUE=true |
This file contains 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 | |
## To use: `ssh -p 33333 <name>@localhost` from server | |
server="tesla@tesla.myserver.com" | |
port=$(cut -c 13-17 < /var/etc/vin) | |
localHost="localhost" | |
if [ "$server" == "tesla@yourserver.com" ]; then | |
echo "Script not yet setup, quitting" |
This file contains 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 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 | |
set -e | |
# | |
# Re-install and re-initialize ceph-mon database | |
# | |
# Useful to go from LevelDB to RocksDB kv_backend | |
# | |
# LevelDB was the old backend used up until Jewel and | |
# newer versions use RocksDB |
This file contains 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 | |
# | |
# Talk to a Virtual Machine through the Qemu Guest Agent | |
# | |
# See: | |
# - https://wiki.qemu.org/Features/GuestAgent | |
# - https://wiki.libvirt.org/page/Qemu_guest_agent | |
# | |
# Author: Wido den Hollander <wido@denhollander.io> | |
# |
This file contains 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@denhollander.io> | |
# | |
# Also see: https://vincent.bernat.ch/en/blog/2017-vxlan-bgp-evpn | |
VNI=100 | |
LOCAL=10.255.255.5 | |
ip link add vxlan${VNI} type vxlan id ${VNI} dstport 4789 local ${LOCAL} nolearning |
This file contains 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 | |
# | |
# Configure the Management services in Cumulus Linux to only run in the management VRF | |
# | |
# Author: Wido den Hollander <wido@denhollander.io> | |
# | |
# https://docs.cumulusnetworks.com/display/DOCS/Management+VRF | |
for SERVICE in ssh ntp snmpd; do | |
systemctl stop ${SERVICE}.service |
This file contains 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 | |
# | |
# Fetch the amount of shards a Ceph RADOS Gateway bucket has | |
# | |
# Author: Wido den Hollander <wido@denhollander.io> | |
# | |
BUCKET=$1 | |
ID=$(radosgw-admin bucket stats --bucket=${BUCKET}|jq -r '.id') |
This file contains 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
import com.googlecode.ipv6.IPv6Address; | |
/* | |
Replace the IPv6 address with anything you like, Link Local or Global, based on the 'ff:fe' in the address | |
this code will tell you if the address is EUI-64 | |
Author: Wido den Hollander <wido@widodh.nl> | |
*/ | |
public class IPv6 { |