I hereby claim:
- I am greencoder on github.
- I am snewman18 (https://keybase.io/snewman18) on keybase.
- I have a public key whose fingerprint is 6D50 6B58 482B 8A3A 496B F4DB D33A 995D 548F C8CE
To claim this, I am signing this object:
| import numpy | |
| import requests | |
| import StringIO | |
| # Use Pillow | |
| from PIL import Image | |
| # Get the latest radar image | |
| request = requests.get('http://radar.weather.gov/ridge/Conus/RadarImg/latest_radaronly.gif') |
I hereby claim:
To claim this, I am signing this object:
| [Pushover] | |
| app_token: <your pushover app token> | |
| user_key: <your pushover user key> |
| import io | |
| import PIL.Image | |
| import urllib2 | |
| import sys | |
| world_file_url = 'http://radar.weather.gov/ridge/Conus/RadarImg/northeast_radaronly.gfw' | |
| radar_file_url = 'http://radar.weather.gov/ridge/Conus/RadarImg/northeast_radaronly.gif' | |
| # Parse the radar image to find the height and width |
| import hyper | |
| import json | |
| import sys | |
| if len(sys.argv) != 4: | |
| print('Usage: server.py /path/to/certificate.pem /path/to/key.pem certificate_password') | |
| sys.exit(2) | |
| cert = sys.argv[1] | |
| key = sys.argv[2] |
| import hyper | |
| import json | |
| import sys | |
| from apns2.errors import APNsException | |
| from apns2.errors import ConnectionException | |
| class APNsClient(object): | |
| def __init__(self, cert_file, server='mock'): |
| # Note: You MUST have curl 7.47+ with http/2 support compiled in | |
| curl -v \ | |
| -d '{"aps":{"alert":"<message>","badge":42}}' \ | |
| -H "apns-topic: <bundle id>" \ | |
| -H "apns-priority: 10" \ | |
| --http2 \ | |
| --cert <certificate file> \ | |
| https://api.development.push.apple.com/3/device/<device token> |
| - (void)campaignKit:(CKManager *)manager didFindCampaign:(CKCampaign *)campaign { | |
| UIApplication *app = [UIApplication sharedApplication]; | |
| // If app is in background, show a local notification. If in foreground, | |
| // show an alert view | |
| if (app.applicationState != UIApplicationStateActive) { | |
| UILocalNotification *notification = [campaign buildLocalNotification]; | |
| [app presentLocalNotificationNow:notification]; |