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
* * * * * pi raspistill -n -q 80 -w 960 -h 720 -e jpg -t 1000 -o - | curl -v -H 'Token: TOKEN' -H 'Content-Type: application/jpg' -H 'Fingerprint: FINGERPRINT' https://webcam.connect.prusa3d.com/c/snapshot -T - |
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 | |
openssl s_client -servername token.actions.githubusercontent.com -showcerts -connect token.actions.githubusercontent.com:443 2>/dev/null < /dev/null | \ | |
openssl x509 -fingerprint -sha1 -noout | \ | |
grep Fingerprint | \ | |
tr -d ':' | \ | |
tr '[:upper:]' '[:lower:]' | \ | |
cut -f2 -d= |
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
locals { | |
public_zones = { | |
"domainone.egg" = "FEEDFACEBEEF" | |
"domaintwo.egg" = "BEEFBEEFFACE" | |
"domainthree.egg" = "FACEFEEDFACE" | |
} | |
} | |
resource "aws_default_vpc" "default" {} |
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
locals { | |
www_zones = { | |
"www.domainone.egg" = "FEEDFACEBEEFFEED" | |
"www.domaintwo.egg" = "BEEFBEEFFEEDFACE" | |
"www.domainthree.egg" = "FACEFACEFEEDFACE" | |
} | |
} | |
resource "aws_s3_bucket" "redirect-www-bucket" { | |
for_each = local.www_zones |
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
function getIPv4Range(networkString) { | |
const networkdef = networkString.split('/'); | |
const netmask = parseInt(networkdef[1]) | |
const bitmask = 32 - netmask; | |
const quads = networkdef[0].split('.'); | |
const addrbin = | |
(parseInt(quads[0]) << 24) + | |
(parseInt(quads[1]) << 16) + | |
(parseInt(quads[2]) << 8) + | |
parseInt(quads[3]); |
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 | |
### BEGIN INIT INFO | |
# Provides: mynodeapp | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: A Node app that runs in the background | |
# Description: A Node app that runs in the background | |
### END INIT INFO |
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 board | |
import digitalio | |
import storage | |
# Only allow code.py updates when turned off | |
switch = digitalio.DigitalInOut(board.D7) | |
switch.direction = digitalio.Direction.INPUT | |
switch.pull = digitalio.Pull.UP | |
storage.remount("/", not switch.value) |
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 ubuntu:20.04 | |
RUN apt-get update && apt-get install -y openssh-server dnsutils telnet netcat vim | |
RUN mkdir /var/run/sshd | |
RUN echo 'root:f33df4ced3adb33f' | chpasswd | |
RUN sed -i 's/#*PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config | |
# SSH login fix. Otherwise user is kicked off after login | |
RUN sed -i 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' /etc/pam.d/sshd |
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/sh | |
sudo find /Applications/Blender.app -perm +111 -type f -exec chmod og+x {} \; | |
sudo find /Applications/Blender.app -type d -exec chmod og+x {} \; |
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 analogio | |
import simpleio | |
import board | |
import time | |
import neopixel | |
import touchio | |
from digitalio import DigitalInOut, Direction, Pull | |
# NeoPixels | |
pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, auto_write=False) |
NewerOlder