Skip to content

Instantly share code, notes, and snippets.

View nathanrosspowell's full-sized avatar
🧑‍🍳
This is it chief.

Nathan Ross Powell nathanrosspowell

🧑‍🍳
This is it chief.
View GitHub Profile
@nathanrosspowell
nathanrosspowell / gif_maker.py
Created August 21, 2016 21:46
ffmpeg gif maker
#!/usr/bin/env python
from os import walk, chdir, mkdir
from os.path import join, splitext
from subprocess import call
from shutil import copyfile, rmtree
from random import seed, randint
from uuid import uuid4
# Batches ffmpeg commands to make GIFs.
# Install https://ffmpeg.org/
@nathanrosspowell
nathanrosspowell / todo.json
Created August 5, 2012 05:58
Stored todo list example
{"item 1 todo":
{"c": ["saa", "asa", "a"],
"d": null,
"p": 4,
"cats": "saa, asa, a, ",
"t": "20120505175158",
"time": "2012 - 5 - 4"
},
"item 2":
{"c": ["rgrgr", "wfgw", "hh"],
@nathanrosspowell
nathanrosspowell / walk_dates.py
Created May 24, 2012 12:40
Walk from a directory (up or down) yielding the results of the passed function.
import os
dir = "blog"
# Walk from a dir returning the results of function.
# The path below the dir should be set out in date format.
# path example: /YYYY/MM/DD/file.ext
# path example: /2012/01/30/file.txt
def walk_dates_and_apply( dir, function, desc ):
for walking in os.walk( dir, topdown = desc ):
@nathanrosspowell
nathanrosspowell / podcast.py
Created May 5, 2012 15:29
Mass podcast downloader.
import xml.dom.minidom
import datetime
import time
import os
import urllib
import sys
def filterName( node, name ):
return node.nodeType == node.ELEMENT_NODE and node.localName == name