I hereby claim:
- I am cdodd on github.
- I am cdodd (https://keybase.io/cdodd) on keybase.
- I have a public key whose fingerprint is 3915 9EE5 AC74 FA4F E4C6 4E03 27D1 49AB BD73 92C6
To claim this, I am signing this object:
#!/usr/bin/python | |
import sys | |
# Get the original and final gravity from the commandline args | |
try: | |
og = float(sys.argv[1]) | |
fg = float(sys.argv[2]) | |
except IndexError: | |
print 'Usage %s <original gravity> <final gravity>' % sys.argv[0] | |
sys.exit(1) |
import sys | |
from dynect.DynectDNS import DynectRest | |
rest_iface = DynectRest() | |
# Log in | |
credentials = { | |
'customer_name': 'my_cust', | |
'user_name': 'my_user', | |
'password': 'my_pass', |
#!/bin/sh | |
PROXY_USER=user | |
PROXY_PASS=password | |
PROXY_PORT=3128 | |
# Clear the repository index caches | |
yum clean all | |
# Update the operating system |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
import subprocess | |
import boto.ec2 as ec2 | |
import boto.utils | |
# Get all "private_dns_name"s from AWS | |
conn = ec2.connect_to_region( | |
boto.utils.get_instance_metadata()['placement']['availability-zone'][:-1] | |
) |
#include <Bounce.h> | |
// ============================================================================ | |
// Begin configuration items | |
// ============================================================================ | |
// Define the numbers for the hat switch pins | |
#define HAT_UP_PIN 3 | |
#define HAT_DOWN_PIN 1 | |
#define HAT_LEFT_PIN 0 |
#!/usr/bin/env python | |
import xmltodict | |
from socket import inet_ntoa | |
from struct import pack | |
import sys | |
import urllib | |
def calcDottedNetmask(mask): | |
bits = 0xffffffff ^ (1 << 32 - mask) - 1 |
To configure an HTTPS server, the ssl
parameter must be enabled on listening sockets in the server
block, and the locations of the server certificate and private key files should be specified:
server {
listen 443 ssl;
server_name www.example.com;
ssl_certificate www.example.com.crt;
ssl_certificate_key www.example.com.key;
import json | |
import requests | |
from requests.auth import HTTPBasicAuth | |
class BitcoinRpc(object): | |
def __init__(self, username, password, host, port=8332): | |
self.username = username |
#!/usr/bin/env python3 | |
import sys | |
import subprocess | |
data = subprocess.run(['ls', '-l'], stdout=subprocess.PIPE).stdout.decode('utf-8').split('\n')) | |
for line in data: | |
items = line.split('.') | |
for element in items[15:-1]: |