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
DPAD Up -> c | |
DPAD Down -> d | |
DPAD Left -> e | |
DPAD Right -> f | |
L Analog Left -> Left Arrow | |
L Analog Right -> Right Arrow | |
L Analog Up -> Up Arrow | |
L Analog Down -> Down Arrow |
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 { | |
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
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
#!/bin/sh | |
mkdir -p log lib etc | |
sudo docker run -it --rm --name certbot -v $PWD/etc:/etc/letsencrypt -v $PWD/lib:/var/lib/letsencrypt -v $PWD/log:/var/log/letsencrypt certbot/certbot certonly --debug --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory |
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 logging | |
import socket | |
from slacker import Slacker | |
from config import configuration | |
logger = logging.getLogger('slack') | |
class Slack(object): | |
def __init__(self, printer): |
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 sleekxmpp | |
class Jabber(sleekxmpp.ClientXMPP): | |
def __init__(self, username, password, instance_name=None): | |
jid = "%s/%s" % (username, instance_name) if instance_name else username | |
super(Jabber, self).__init__(jid, password) | |
self.instance_name = instance_name | |
self.add_event_handler('session_start', self.start, threaded=False, disposable=True) | |
self.add_event_handler('message', self.receive, threaded=True, disposable=False) |
NewerOlder