Skip to content

Instantly share code, notes, and snippets.

@tyndyll
tyndyll / marathon-deploy.go
Created October 21, 2015 23:30
A handy shortcut for deploying apps to Marathon.
package main
import (
"bytes"
"encoding/json"
"errors"
"flag"
"fmt"
"io/ioutil"
"log"
@tyndyll
tyndyll / README.md
Last active November 4, 2021 05:54
Download Podcast from Overcast Permalinks

Download From Overcast

Overcast on iOS is my primary podcasting listening method, but I have an occasional need to download podcasts for archival or offline listening purposes. This script takes advantage of Overcast's permalink and showpage to get the podcast author and title before downloading the podcast itself from the original page.

Usage: python download_from_overcast.py 
@tyndyll
tyndyll / podcast_download.py
Last active October 14, 2015 08:49
Take a Podcast/MP3 RSS feed and download and all the media files contained therein
#!/usr/bin/env python
import hashlib
import logging
import optparse
import os
import sys
import urllib2
import xml.dom.minidom
@tyndyll
tyndyll / audio-splitter.sh
Created September 25, 2015 14:46
Given an audio file, break it into chunks
#!/bin/bash
# Copyright (c) 2013, Tyndyll
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
@tyndyll
tyndyll / translink_extract.py
Created September 25, 2015 14:41
Extracting Translink NI Timetable Data
@tyndyll
tyndyll / spec_ops_eyes.py
Created September 25, 2015 14:34
Spec Ops Eyes
#!/usr/bin/env python
from SimpleCV import Camera, Display, Color
cam = Camera()
display = Display(resolution = (800, 600))
while display.isNotDone():
img = cam.getImage()
@tyndyll
tyndyll / keybase.md
Last active April 18, 2018 20:25
keybase.md

Keybase proof

I hereby claim:

  • I am tyndyll on github.
  • I am tyndyll (https://keybase.io/tyndyll) on keybase.
  • I have a public key ASAD9vtg2PNFnl-C7IE2qUlHfWLJne1sz5m9YsRgiwes2go

To claim this, I am signing this object:

@tyndyll
tyndyll / get_gmail.py
Created February 10, 2015 15:18
Extract Mail from GMail and Import into Neo4J
#!/usr/local/env python
import argparse
import email
import extract
import getpass
import imaplib
import os
import sys
import uuid
@tyndyll
tyndyll / extract.py
Created January 23, 2015 18:49
Parsing Maildir Mail Stored on Disk with Python
def unicode_it(data):
# Take a string of data and convert it to unicode
try:
return unicode(data, errors="replace").strip()
except TypeError as E:
return u""
def extract(msg, msg_obj, attachments):
if msg.is_multipart():
for part in msg.get_payload():
@tyndyll
tyndyll / logpipe.go
Last active August 29, 2015 14:08
Printing Bytes Passing through a Pipe
package main
import (
"bufio"
"io"
)
type LoggedPipe struct {
Stdin *io.PipeReader
Stdout *PipeCloner