Skip to content

Instantly share code, notes, and snippets.

@ellieayla
ellieayla / eventhub-send-deadlock.py
Created March 7, 2020 17:53
eventhub-send-deadlock-issue
import logging
import time
import json
from azure.eventhub import EventHubProducerClient, EventData
CONNECTION_STRING='Endpoint=sb://example.servicebus.windows.net/;SharedAccessKeyName=someone;SharedAccessKey=secret'
EVENTHUB_NAME='example'
@ellieayla
ellieayla / deny-ingress.yaml
Created March 19, 2021 15:58
Do I understand NetworkPolicy behavior?
# https://raw.githubusercontent.com/fluxcd/flux2/main/manifests/policies/deny-ingress.yaml
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: deny-ingress
spec:
policyTypes:
- Ingress
- Egress
@ellieayla
ellieayla / pulse.py
Created May 2, 2021 18:08
Pulse Raspberry PI GPIO pin for 1 second
from gpiozero import LED
from time import sleep
# https://gpiozero.readthedocs.io/en/stable/recipes.html
# Pi Model 3B V1.2
output_relay = LED(4)
def pulse(out=output_relay):
out.on()
#!/usr/bin/env python
from __future__ import division
import hashlib
users = ['alice','bob','cathy','david','XARLAX', 'e','f','g','h','i']
users = ['Sophia', 'Emma', 'Olivia', 'Isabella', 'Ava', 'Mia', 'Emily', 'Abigail', 'Madison', 'Elizabeth', 'Charlotte', 'Avery', 'Sofia', 'Chloe', 'Ella', 'Harper', 'Amelia', 'Aubrey', 'Addison', 'Evelyn', 'Natalie', 'Grace', 'Hannah', 'Zoey', 'Victoria', 'Lillian', 'Lily', 'Brooklyn', 'Samantha', 'Layla', 'Zoe', 'Audrey', 'Leah', 'Allison', 'Anna', 'Aaliyah', 'Savannah', 'Gabriella', 'Camila', 'Aria', 'Kaylee', 'Scarlett', 'Hailey', 'Arianna', 'Riley', 'Alexis', 'Nevaeh', 'Sarah', 'Claire', 'Sadie', 'Peyton', 'Aubree', 'Serenity', 'Ariana', 'Genesis', 'Penelope', 'Alyssa', 'Bella', 'Taylor', 'Alexa', 'Kylie', 'Mackenzie', 'Caroline', 'Kennedy', 'Autumn', 'Lucy', 'Ashley', 'Madelyn', 'Violet', 'Stella', 'Brianna', 'Maya', 'Skylar', 'Ellie', 'Julia', 'Sophie', 'Katherine', 'Mila', 'Khloe', 'Paisley', 'Annabelle', 'Alexandra', 'Nora', 'Melanie', 'London', 'Gianna', 'Naom
@ellieayla
ellieayla / patch-secret-known-hosts.sh
Last active November 17, 2021 03:06
patch-secret-known-hosts.sh
#!/usr/bin/env bash
# Ref https://github.com/fluxcd/source-controller/issues/490
# Ref https://github.blog/2021-09-01-improving-git-protocol-security-github/
function usage() {
echo "Usage: $0 context [list|diff|apply]"
}
if [ -z "$1" ]; then