Skip to content

Instantly share code, notes, and snippets.

View devinvenable's full-sized avatar

Devin Venable devinvenable

  • 918.software
  • Tulsa, OK
View GitHub Profile
@devinvenable
devinvenable / allow access control header.txt
Created April 12, 2021 21:13
Allow Access Control Header for gsutil
Save as temp.json
[
{
"origin": ["*"],
"method": ["*"]
}
]
Now, use command to update your bucket
@devinvenable
devinvenable / env.sh
Created January 3, 2020 17:05
Run manage.py in SSH shell inside Elastic Beanstalk instance
#!/bin/bash
source /opt/python/run/venv/bin/activate
source /opt/python/current/env
cd /opt/python/current/app
python manage.py
@devinvenable
devinvenable / gist:303cf4d7a180034e26bcb4e94267a54b
Last active September 25, 2019 20:36
Generate a sphere of points for rendering in Minecraft sky
# for kid's Python class
import math, random
import mcpi.block as block
from mcpi.minecraft import Minecraft
import time
def fibonacci_sphere(samples=1,randomize=True):
rnd = 1.
if randomize:
Verifying that +devinvenable is my blockchain ID. https://onename.com/devinvenable
image = Image.open(x)
try:
if hasattr(image, '_getexif'): # only present in JPEGs
for orientation in ExifTags.TAGS.keys():
if ExifTags.TAGS[orientation]=='Orientation':
break
e = image._getexif() # returns None if no EXIF data
if e is not None:
exif=dict(e.items())