Skip to content

Instantly share code, notes, and snippets.

@christ0pher
christ0pher / cerbero-kubernetes-k8s.yaml
Created December 14, 2017 16:45
Cerbero Kubernetes Deployment for managing elasticsearch in kubernetes
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: es-kopf
namespace: default
labels:
yp-app: es-cerebro
spec:
replicas: 1
selector:
import base64
import uuid
__author__ = 'wolf@youpooly.com'
def enc_uuid(uid):
uuid_uid = uuid.UUID(uid)
uuid_uid_bytes = uuid_uid.bytes
uuid_uid_bytes_64 = base64.urlsafe_b64encode(uuid_uid_bytes)
@christ0pher
christ0pher / gist:f2c4748a09ed31cf71a8
Created June 15, 2015 16:37
Google URL-signing for Python3
from requests.packages.urllib3.util import parse_url
import hashlib
import hmac
import base64
""" Sign a URL using the client_secret """
__author__ = 'christopher@levire.com'
def sign_url(input_url=None, client_id=None, client_secret=None):
""" Sign a request URL with a Crypto Key.
### Keybase proof
I hereby claim:
* I am christ0pher on github.
* I am pelzmorph (https://keybase.io/pelzmorph) on keybase.
* I have a public key whose fingerprint is E4FF 0C3E 8306 AB87 2B11 D309 33E7 C5C3 C440 23CA
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am christ0pher on github.
* I am pelzmorph (https://keybase.io/pelzmorph) on keybase.
* I have a public key whose fingerprint is B2D5 B9DF 824D 8887 9645 9E0E 1B61 AC99 D11A 725E
To claim this, I am signing this object: