Skip to content

Instantly share code, notes, and snippets.

View emmeowzing's full-sized avatar
I code for coffee ☕

Emma Doyle emmeowzing

I code for coffee ☕
View GitHub Profile
@janeczku
janeczku / 01-multus-k3s.md
Last active June 19, 2024 12:46
Multus CNI with k3s and RKE

Using Multus CNI in K3S

By default, K3S will run with flannel as the CNI and use custom directories to store CNI plugin binaries and config files(You can inspect the kubelet args K3S uses via journalctl -u k3s|grep cni-conf-dir). So you need to configure that properly When deploying Multus CNI.

For example given the official Multus manifests in https://github.com/intel/multus-cni/blob/36f2fd64e0965e639a0f1d17ab754f0130951aba/images/multus-daemonset.yml, the following changes are needed:

volumes:
 - name: cni
@riobard
riobard / tcpdump.txt
Last active August 12, 2022 08:19
Poem lines broadcast by my ISP-provided fiber optical modem
# My ISP-provided fiber optical modem broadcasts a line of a poem every ten seconds. Here's the tcpdump of the complete poem.
# The optical modem is made by Shanghai Nokia-Bell Co.,Ltd and its model number is G-140W-UD. It's provided by my ISP, China Unicom in Shenzhen.
$ tcpdump -i vlan10 ether proto 0x8300
15:59:00.720301 00:00:00:00:00:12 (oui Ethernet) > Broadcast, ethertype Unknown (0x8300), length 72:
0x0000: 0000 0000 e4ea 8386 d93c 5468 6520 6461 .........<The.da
0x0010: 7920 4920 6c6f 7374 206d 7920 7665 7279 y.I.lost.my.very
0x0020: 2066 6972 7374 2074 6f6f 7468 2c00 0000 .first.tooth,...
0x0030: 0000 0000 0000 0000 0000 ..........
15:59:10.740778 00:00:00:00:00:12 (oui Ethernet) > Broadcast, ethertype Unknown (0x8300), length 72:
@hongkongkiwi
hongkongkiwi / main.tf
Last active November 16, 2023 23:38
Initialises Terraform HTTP backend to Gitlab. Here's a nice script which will ask for details in an interactive way.
# More information can be found at https://docs.gitlab.com/ee/user/infrastructure/#gitlab-managed-terraform-state
terraform {
backend "http" {
}
}
@Hakky54
Hakky54 / openssl_commands.md
Last active June 17, 2024 14:32 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@otsuka752
otsuka752 / list_ns-of-R53
Created August 30, 2019 19:40
list of NS(NameServer) and IPAddress of Amazon Route 53
#0 ns-0.awsdns-00.com. 205.251.192.0
#1 ns-1.awsdns-00.com. 205.251.192.1
#2 ns-2.awsdns-00.com. 205.251.192.2
#3 ns-3.awsdns-00.com. 205.251.192.3
#4 ns-4.awsdns-00.com. 205.251.192.4
#5 ns-5.awsdns-00.com. 205.251.192.5
#6 ns-6.awsdns-00.com. 205.251.192.6
#7 ns-7.awsdns-00.com. 205.251.192.7
#8 ns-8.awsdns-01.com. 205.251.192.8
#9 ns-9.awsdns-01.com. 205.251.192.9
@superseb
superseb / check-certificate-state-rancherv22.md
Last active August 28, 2023 07:52
Check certificate state on Rancher v2.2 clusters

Check certificate state on Rancher v2.2 clusters

Steps to verify certificate state for custom clusters in v2.2

Check certificates locally on nodes

Run script below to output certificate checksums for certificates present on the node.

#!/bin/sh
@ayZagen
ayZagen / replace.sh
Last active September 26, 2023 13:45
Replace simple json values by key with corresponding environment variable using jq
#!/bin/sh
## Install if jq package doesn't exist
if which jq; then echo "jq exists";
else
if which yum; then
yum jq
elif which apt-get; then
apt-get install jq
elif which apk; then
apk add --no-cache jq
@AlainODea
AlainODea / main.tf
Last active August 22, 2022 14:17
Terraform: Latest Ubuntu 18.04 LTS encrypted AMI
resource "aws_ami_copy" "ubuntu-18_04-encrypted" {
name = "${data.aws_ami.ubuntu-18_04.name}-encrypted"
description = "${data.aws_ami.ubuntu-18_04.description} (encrypted)"
source_ami_id = "${data.aws_ami.ubuntu-18_04.id}"
source_ami_region = "${var.region}"
encrypted = true
tags {
ImageType = "encrypted-ubuntu-18_04"
}
@nlohmann
nlohmann / remove_empty_elements.py
Created March 12, 2018 14:19
Remove empty arrays, objects or null elements from a JSON value
def remove_empty_elements(d):
"""recursively remove empty lists, empty dicts, or None elements from a dictionary"""
def empty(x):
return x is None or x == {} or x == []
if not isinstance(d, (dict, list)):
return d
elif isinstance(d, list):
return [v for v in (remove_empty_elements(v) for v in d) if not empty(v)]
@asvignesh
asvignesh / Build_seed_iso
Created January 6, 2018 07:42
Samples to create a cloud-init configuration ISO.
$ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data