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
from esp32 import RMT | |
from machine import Pin, Timer | |
button3 = Pin(9, Pin.IN, Pin.PULL_UP) | |
button4 = Pin(10, Pin.IN, Pin.PULL_UP) | |
ir = Pin(2, Pin.OUT) | |
rmt = RMT(0, pin=ir, clock_div=191, tx_carrier=(38000, 50, 1)) | |
tim = Timer(3) | |
def send_command(nibble1, nibble2, nibble3): |
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
--- | |
apiVersion: storage.k8s.io/v1 | |
kind: StorageClass | |
metadata: | |
name: prometheus | |
provisioner: lvm.csi.metal-stack.io | |
reclaimPolicy: Delete | |
volumeBindingMode: WaitForFirstConsumer | |
allowVolumeExpansion: true | |
parameters: |
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
--- | |
apiVersion: storage.k8s.io/v1 | |
kind: StorageClass | |
metadata: | |
name: postgres | |
parameters: | |
recordsize: "32k" | |
compression: "off" | |
dedup: "off" | |
fstype: "zfs" |
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
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: operator-deployment | |
namespace: kube-system | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRoleBinding | |
metadata: |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <string.h> | |
#include <crypt.h> | |
/** | |
* Illustrative and probably very buggy example of what su essentially does | |
* |
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
# Pull the SDD1306 lib from here https://github.com/adafruit/micropython-adafruit-ssd1306/blob/master/ssd1306.py | |
from time import sleep_ms | |
from machine import Pin, I2C | |
from ssd1306 import SSD1306_I2C | |
buf = "wubba lubba dub dub " | |
i2c = I2C(-1, Pin(4),Pin(5),freq=40000) # Bitbanged I2C bus | |
assert 60 in i2c.scan(), "No OLED display detected!" |
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
""" | |
Websockets client for micropython | |
Based very heavily on | |
https://github.com/aaugustin/websockets/blob/master/websockets/client.py | |
""" | |
import ubinascii as binascii | |
import urandom as random | |
import ure as re |
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
#!/usr/bin/python | |
# encoding: utf-8 | |
import subprocess | |
import os | |
import re | |
print "Storage status:" | |
for node in os.listdir("/dev"): | |
if not re.match("[sv]d[a-z]$", node): continue | |
cmd = "/usr/sbin/smartctl", "-a", "/dev/%s" % node |
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
""" | |
Estonian ID-card authentication middleware for Django, | |
but this should be pretty easily modifiable for any application | |
To use install cryptography.io: | |
apt-get install -y python python-pip python-dev \ | |
python-cffi build-essential libffi-dev libssl-dev | |
pip install cryptography |