A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
module nexus_copy | |
go 1.14 | |
require ( | |
github.com/cavaliercoder/grab v2.0.0+incompatible | |
gopkg.in/yaml.v2 v2.4.0 | |
) |
# Simple No-ip.com Dynamic DNS Updater | |
# | |
# By Nathan Giesbrecht (http://nathangiesbrecht.com) | |
# | |
# 1) Install binary as described in no-ip.com's source file (assuming results in /usr/local/bin) | |
# 2) Run sudo /usr/local/bin/noip2 -C to generate configuration file | |
# 3) Copy this file noip2.service to /etc/systemd/system/ | |
# 4) Execute `sudo systemctl daemon-reload` | |
# 5) Execute `sudo systemctl enable noip2` | |
# 6) Execute `sudo systemctl start noip2` |
from tweepy.streaming import StreamListener | |
from tweepy import OAuthHandler | |
from tweepy import Stream | |
import json | |
import requests | |
client_key = "TwitterConsumerKey" | |
client_secret = "TwitterConsumerSecret" | |
token = "TwitterAppAccessToken" | |
token_secret = "TwitterAppAccessTokenSecret" |
just change out app_name for your purposes
openssl genrsa 2048 > app_name-wildcard.key
openssl req -new -x509 -nodes -sha1 -days 3650 -key app_name-wildcard.key > app_name-wildcard.cert
# Common Name (eg, your name or your server's hostname) []:*.app_name.com
openssl x509 -noout -fingerprint -text < app_name-wildcard.cert > app_name-wildcard.info
from itertools import chain | |
def parse_range(rng): | |
parts = rng.split('-') | |
if 1 > len(parts) > 2: | |
raise ValueError("Bad range: '%s'" % (rng,)) | |
parts = [int(i) for i in parts] | |
start = parts[0] | |
end = start if len(parts) == 1 else parts[1] | |
if start > end: |