Skip to content

Instantly share code, notes, and snippets.

View pmac's full-sized avatar
🔥
🦊

Paul McLanahan pmac

🔥
🦊
View GitHub Profile
@pmac
pmac / ring-videos-download.py
Created October 30, 2018 00:16
Download all the videos between two events from Ring
# https://github.com/tchellomello/python-ring-doorbell
from ring_doorbell import Ring
# ID of the newest video you want
OLDER_THAN = 6589184120805222376
# ID of the oldest video you want
LAST_ONE = 6587337941997938664
# grab info on this many videos at a time
CHUNK_SIZE = 50
@pmac
pmac / views.py
Created October 24, 2017 16:51
optional redirect django CBV
# -*- coding: utf-8 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import re
from django.shortcuts import redirect
from django.views.generic.base import TemplateView
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://www.mozilla.org/</loc>
<xhtml:link rel="alternate" hreflang="zh-TW" href="https://www.mozilla.org/zh-TW/" />
<xhtml:link rel="alternate" hreflang="ca" href="https://www.mozilla.org/ca/" />
<xhtml:link rel="alternate" hreflang="cy" href="https://www.mozilla.org/cy/" />
<xhtml:link rel="alternate" hreflang="gd" href="https://www.mozilla.org/gd/" />
<xhtml:link rel="alternate" hreflang="cs" href="https://www.mozilla.org/cs/" />
<xhtml:link rel="alternate" hreflang="ne-NP" href="https://www.mozilla.org/ne-NP/" />
@pmac
pmac / -
Created September 30, 2016 20:09
{% set title = '500: Something went wrong...' %}
<!doctype html>
<html class="no-js">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>{{ title }}</title>
<meta name="description" content="Daily standup updates for your projects.">
<link rel="icon" type="image/png" href="{{ static('img/favicon.png') }}" />
{% stylesheet 'common' %}
@pmac
pmac / keybase.md
Created July 7, 2016 14:19
My keybase.io proof

Keybase proof

I hereby claim:

  • I am pmac on github.
  • I am pmac (https://keybase.io/pmac) on keybase.
  • I have a public key ASBr9T1oubI_25zmH46xw03Bhp94xd10XQ35THyA_1BW6Qo

To claim this, I am signing this object: