This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Read the MAC address of a Spark Core which can't connect to the cloud yet. | |
// This is useful if you're on a network that requires MAC-based registration. | |
// Steven Bell <[email protected]> | |
// 28 November 2014 | |
SYSTEM_MODE(MANUAL); // We can't connect to the internet anyway... | |
byte mac[6]; | |
void setup() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Steven Bell <[email protected]>, based on https://gist.github.com/emk/961877 | |
require 'rubygems' | |
require 'nokogiri' | |
require 'fileutils' | |
include FileUtils | |
# Delete all temporary PDF files | |
def delete_temporary_files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function myFunction() { | |
// Open the spreadsheet (assumes that it's shared to everyone with the link, or otherwise accessible to me) | |
var ss = SpreadsheetApp.openByUrl( | |
'<SPREADSHEET LINK HERE>'); | |
Logger.log("Opened schedule spreadsheet: " + ss.getName()); | |
// Pull all the data into a big array | |
var data = ss.getDataRange().getValues(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Convert an Inkscape SVG file into a set of PDF slides for presentation | |
# or printing. | |
# | |
# Requires inkscape and pdftk to be installed and in the PATH. | |
# | |
# Inspired by mkpdfs.rb (https://gist.github.com/emk/961877) | |
# Steven Bell <[email protected]> | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var LABEL_NAME = 'inbox-holding' | |
function setup() { | |
// Create a label to put paused messages in | |
// First go through all the labels and check that it doesn't already exist | |
var label = null; | |
allLabels = Gmail.Users.Labels.list('me'); | |
for (var i = 0; i < allLabels.labels.length; i++) { | |
if(allLabels.labels[i].name == LABEL_NAME){ | |
label = allLabels.labels[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var LABEL_NAME = 'inbox-holding' | |
// Each time must have the format 'HOUR:MINUTE' | |
var schedule = [['13:00', '17:00'], // Sunday | |
['9:30', '13:00', '17:00'], // Monday | |
['9:30', '13:00', '17:00'], // Tuesday | |
['9:30', '13:00', '17:00'], // Wednesday | |
['9:30', '13:00', '17:00'], // Thursday | |
['9:30', '13:00', '17:00'], // Friday | |
['8:00', '13:00', '17:00']]; // Saturday |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Class for homework which allows answers to be embedded and removed | |
\ProvidesClass{homework} | |
\LoadClass{article} | |
% Used for creating environment which can show/hide content | |
\usepackage{environ} | |
% Margin setup | |
\usepackage{geometry} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/python3 | |
# Push a QTI file to Canvas and configure the settings of the resulting imported quiz | |
# This code is public domain. | |
# Steven Bell <[email protected]> | |
from canvasapi import Canvas | |
import requests | |
from sys import argv | |
from time import sleep |