Skip to content

Instantly share code, notes, and snippets.

View dave-cross's full-sized avatar

Dave Cross dave-cross

  • Calgary, Canada
View GitHub Profile
@dave-cross
dave-cross / taskpaper-completer.py
Created November 21, 2013 14:52
A script for Taskpaper files that sets tasks as @done if all subtasks are complete. This is purely a test. It would have to be added to in order to grab and parse *.taskpaper files.
#! /usr/bin/env python
# -*- coding: UTF-8 -*-
import re
# imput string sample data
targ = ''' - Task 09
This is a comment
- Subtask 9.01 @done
This is a subtask comment
@dave-cross
dave-cross / color sampler with picker.py
Last active August 29, 2015 14:14
Sample colours from selected image and overlay selected colours along bottom edge of image. For use in Pythonista. UI selector borrowed directly from Ole Zorn @Olemoritz: https://gist.github.com/omz/ae96874dfbda54ed2771
'''
Sample colours from selected image and overlay selected colours along bottom edge of image.
For use in Pythonista
UI selector borrowed directly from Ole Zorn @olemoritz: https://gist.github.com/omz/ae96874dfbda54ed2771
'''
import photos
import Image
import random
@dave-cross
dave-cross / .eleventy.js
Last active April 13, 2020 23:30
A basic Image Sharp transformer for 11ty
const { JSDOM } = require("jsdom");
const responsiveImage = require("./src/js/responsive-image");
// Set the project root for use with Sharp.
global.__rootdir = __dirname;
module.exports = function(eleventyConfig) {
eleventyConfig.addPassthroughCopy("img");
eleventyConfig.addTransform("transform-sharp", async function(
@dave-cross
dave-cross / editorial-challenge-harvard-business-review.markdown
Created September 19, 2022 01:18
Editorial Challenge -- Harvard Business Review