I hereby claim:
- I am mcbhenwood on github.
- I am mcbhenwood (https://keybase.io/mcbhenwood) on keybase.
- I have a public key ASCuAvFtJWAdwZ4hBI_Qt8BgE_yt0vns_tJZy9H-TtJrHQo
To claim this, I am signing this object:
import hashlib | |
EXAMPLE_COMPANY = {"name": "Acme Ltd", "id": 1234} | |
short_hash_of_id = hashlib.sha256( | |
str(EXAMPLE_COMPANY["id"]).encode("utf-8") | |
).hexdigest()[:7] | |
print(f"Folder name: {EXAMPLE_COMPANY['name']} ({short_hash_of_id})") |
#!/usr/bin/env python3 | |
# | |
# POC to call Google Drive API as a headless process | |
# -------------------------------------------------- | |
from googleapiclient.discovery import build | |
from googleapiclient.http import MediaFileUpload | |
from google.oauth2 import service_account | |
SCOPES = ['https://www.googleapis.com/auth/drive'] | |
SERVICE_ACCOUNT_FILE = 'keyfile.json' # Downloaded from GCP Service Account detail page |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
docker rm $( docker stop $(docker ps -a | grep $1 | awk '{ print $1; }')) |
"dependencies": { | |
"angular": "1.3.x", | |
"angular-bootstrap": "0.14.x", | |
"angular-resource": "1.3.x", | |
"angular-route": "1.3.x", | |
"bootstrap": "3.3.x", | |
"jquery": "2.1.1", | |
"moment": "^2.8.4", | |
"Chart.js": "2.0.0-alpha2" | |
}, |
- namespace: aws:elb:loadbalancer | |
option_name: LoadBalancerHTTPPort | |
value: OFF | |
- namespace: aws:elb:loadbalancer | |
option_name: LoadBalancerHTTPSPort | |
value: 443 | |
- namespace: aws:elb:loadbalancer | |
option_name: LoadBalancerSSLPortProtocol |
""" | |
Hooking up Selenium to Behave. | |
For details, see: | |
http://pyuseful.wordpress.com/2012/11/08/running-cucumber-style-tests-in-django-using-behave/ | |
""" | |
import logging | |
from selenium import webdriver |
""" | |
Run Selenium headless tests against Django test server | |
------------------------------------------------------ | |
Creates and destroys a test environment each time. | |
Requires Xvfb and IceWeasel to be installed. For Debian flavours: | |
sudo apt-get install xvfb iceweasel |