Skip to content

Instantly share code, notes, and snippets.

View eyesee1's full-sized avatar

Duna Csandl eyesee1

View GitHub Profile
@eyesee1
eyesee1 / simulate_pinball_lanes.ino
Last active August 29, 2015 14:08
arduino pinball lanes simulator
/* Pinball rollover lanes simulator
*
* Isaac Csandl http://nerkles.com/
* Copyleft 2014 All Rights Reversed.
*/
// pins for rollover targets:
const int laneSwitches[] = {5,6,7};
// pins for LEDs:
const int laneLEDs[] = {2,3,4};
@eyesee1
eyesee1 / wagtail_remote_image.py
Created October 17, 2016 20:23
Grabbing image data from a URL and saving into Wagtail CMS - example code
from io import BytesIO
import requests
from django.core.files.images import ImageFile
from wagtail.wagtailimages.models import Image
# event is a model object, substitute your model
# filename and title are up to you
# in my model, event.event_image is a ForeignKey to wagtailimages.Image
response = requests.get(url)