Skip to content

Instantly share code, notes, and snippets.

View xfxf's full-sized avatar

Ryan Verner xfxf

  • Next Day Video
  • Australia
View GitHub Profile
### Keybase proof
I hereby claim:
* I am xfxf on github.
* I am xfxf (https://keybase.io/xfxf) on keybase.
* I have a public key ASDp1CSnTU0A4IGwEMI06bL00zON8MyE8sD_LoWYuHNmswo
To claim this, I am signing this object:
@xfxf
xfxf / download_my_podcasts.py
Last active August 23, 2017 04:01 — forked from janetriley/download_my_podcasts.py
A Python script to download podcasts from an xml feed and tag the MP3s.
#!/usr/bin/python
"""
A script for downloading some podcasts.
Originally from https://gist.githubusercontent.com/janetriley/7762552/raw/9dcc46acb727757c4dd57d884484e04f5b664871/download_my_podcasts.py
Modified to allow fetching podcast via HTTP/HTTPS URI, bypass CloudFlare protection by detecting user agent,
removing custom tagging, and other fixes
"""
"""
Converts users/tokens from python-social-auth to django-allauth
Makes some assumptions (i.e. single SocialApp of 'facebook' already added)
"""
from django.core.management.base import NoArgsCommand
from django.db import connection, IntegrityError
from allauth.socialaccount.models import SocialAccount, SocialToken
from users.models import User
import json
@xfxf
xfxf / stripe-pinax-local.py
Created March 30, 2017 01:31
stripe-pinax webhook parser
#!/usr/bin/python
# Script to test stripe webhooks in development.
# Should be run from a local machine (not inside of Docker).
#
# To use, create a requestb.in, ensure this is configured in Stripe (test account),
# and pass the key (not the URL) to this as an argument. Errors (HTTP error code)
# the first run are normal.
#
# If you're getting a requests SSL error, try upgrading requests:
@xfxf
xfxf / gist:3f37fb4d6d2bda98fb5876085117c47f
Last active August 3, 2016 11:25
Read Pycon AU 2016 schedule, print out longest presenter & title names
#!/usr/bin/python
"""Read Pycon AU 2016 schedule, print out longest presenter & title names"""
import requests
SCHEDULE_JSON = 'https://2016.pycon-au.org/programme/schedule/json'
def get_presenter_title(schedule):
"""returns dict: {presenter: title}"""
result = requests.get(schedule, verify=False)