Skip to content

Instantly share code, notes, and snippets.

View glasnt's full-sized avatar
🦜

Katie McLaughlin glasnt

🦜
View GitHub Profile
@glasnt
glasnt / Makefile
Last active August 29, 2015 14:11 — forked from christian-marie/Makefile
Makefile for all the awesome "markdown -> pandoc -> pdf"-ness
MARKDOWNS=$(wildcard *.md)
PDFS=$(MARKDOWNS:md=pdf)
all: $(PDFS)
clean:
rm -f $(PDFS)
%.pdf: %.md
pandoc -V geometry:margin=1in -V papersize:"a4paper" --toc $< -o $@
<!doctype html>
<script src="https://code.shutterstock.com/rickshaw/vendor/d3.v2.js"></script>
<script src="https://code.shutterstock.com/rickshaw/rickshaw.min.js"></script>
<div id="chart"></div>
<script>
// Return an xinterp function for a given graph
function xinterp_on_graph(graph) {
@glasnt
glasnt / glitchulate.py
Created November 15, 2016 00:06 — forked from hawkowl/glitchulate.py
Make your favourite images into glitched monstrosities! (Requires pillow from PyPI, Py2/3/pypy compatible)
from __future__ import print_function
import sys
import random
from collections import deque
from PIL import Image
# THIS IS THE MAGIC VALUE THAT MAKES EVERYTHING GLITCHED
@glasnt
glasnt / Code.gs
Created December 10, 2018 09:29 — forked from rheajt/Code.gs
google apps script to open a new website in a new window
function openTab() {
var selection = SpreadsheetApp.getActiveSheet().getActiveCell().getValue();
var html = "<script>window.open('" + selection + "');google.script.host.close();</script>";
var userInterface = HtmlService.createHtmlOutput(html);
SpreadsheetApp.getUi().showModalDialog(userInterface, 'Open Tab');
}
from datasette.database import Database
from datasette import hookimpl
from datasette.utils.asgi import Response
import os
`
async def reload_db(datasette):
spec = datasette.plugin_config('datasette-reload-db')
db_dir = os.listdir(spec['dir'])
databases = datasette.databases