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 python | |
| from __future__ import print_function | |
| import sys | |
| from configparser import RawConfigParser, NoOptionError | |
| from itertools import chain | |
| import argparse | |
| def strip_quotes(s): |
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 python | |
| """ | |
| Demonstrate sending an open file descriptor between a pair of processes, the recipient of | |
| which will read the file contents, depite not having permission to open(..., 'r') the file. | |
| """ | |
| import socket | |
| import array | |
| import sys |
This file has been truncated, but you can view the full file.
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
| --- | |
| title: Distance from shops to bike parking | |
| description: Visualize bicycle parking availability by location | |
| type: geojson | |
| popupTemplate: > | |
| {% assign desc = properties.name | default: properties.amenity | default: properties.highway | default: properties.leisure %} | |
| <h3>{{ desc }}</h3> | |
| <p> | |
| <b><a href="https://openstreetmap.org/{{ properties.type }}/{{ properties.id }}">OSM {{ properties.type}}/{{ properties.id }}</a></b> | |
| is {{ properties._distance_meters | round: 0 }} metres from nearest bicycle parking: |
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 python | |
| import sys | |
| from argparse import ArgumentParser, Namespace | |
| from collections.abc import Sequence | |
| from glob import glob | |
| from pathlib import Path | |
| from typing import NamedTuple | |
| from marko import Markdown |
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 | |
| # 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 |
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 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 |
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
| 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() |
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
| # 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 |
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
| 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' | |
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
| ### Can a ServiceAccount in a namespace be given permissions to act in another namespace? | |
| # Answer: Yes. A RoleBinding in one namespace can cite a ServiceAccount in *any* namespace. | |
| ### Test | |
| # $ kubectl apply -f namespace-permission-test.yaml | |
| ### Manifests |
NewerOlder