Skip to content

Instantly share code, notes, and snippets.

@acspike
acspike / GaTechKalturaPlaylistDuration.js
Created January 17, 2022 23:42
Calculate total duration of a Kaltura playlist
// ==UserScript==
// @name Display total play time in playlist.
// @namespace gatech.edu
// @version 0.1.0
// @match *://canvasgatechtest.kaf.kaltura.com/*
// @match *://cdnapisec.kaltura.com/*
// @grant none
// @author Aaron Spike
// @description 1/25/2021
// ==/UserScript==
@acspike
acspike / GaTechOscarCourseFilter.js
Last active November 14, 2021 22:11
Hide courses that are not on your shortlist in the Oscar Look-up Classes Advanced Search
// ==UserScript==
// @name GaTech Oscar Course Filter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Hide courses that are not on your shortlist in the Oscar Look-up Classes Advanced Search
// @author aspike3
// @match https://oscar.gatech.edu/bprod/*
// @icon https://www.google.com/s2/favicons?domain=gatech.edu
// @grant none
// ==/UserScript==
@acspike
acspike / skog.html
Created November 24, 2016 19:14
Make Skill-O-Grams
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
Array.prototype.shuffle = function() {
var i = this.length, j, temp;
if ( i == 0 ) return this;
@acspike
acspike / gist:0011efa65b576e8f00f3
Last active August 29, 2015 14:08
arduino to norland test
#include "TICL.h"
#include "CBL2.h"
#include <IRremote.h>
#define r_play 0xE1447A85
#define r_stop 0xE14406F9
#define r_fwd 0xE1444AB5
#define r_rev 0xE144CA35
#define r_aud 0xE144DE21
#define r_sub 0xE1445EA1
@acspike
acspike / gist:f2ac7deac5fbc94effd5
Created October 24, 2014 16:59
orbeon test #1 log
2014-10-24 11:52:53,589 INFO ProcessorService - /mlc/test - Received request
2014-10-24 11:52:53,589 DEBUG URLGenerator - OXF Protocol: Using ResourceManager for key /org/orbeon/oxf/xml/schemas/pipeline.rng
2014-10-24 11:52:53,590 DEBUG URLGenerator - OXF Protocol: Using ResourceManager for key /config/prologue-servlet.xpl
2014-10-24 11:52:53,590 DEBUG URLGenerator - OXF Protocol: Using ResourceManager for key /org/orbeon/oxf/xml/schemas/aggregator.rng
2014-10-24 11:52:53,591 DEBUG ConcreteChooseProcessor - Choose: taking otherwise branch at line 25, column 40 of oxf:/config/prologue-servlet.xpl
2014-10-24 11:52:53,591 DEBUG URLGenerator - OXF Protocol: Using ResourceManager for key /org/orbeon/oxf/xml/schemas/page-flow-controller.rng
2014-10-24 11:52:53,591 DEBUG URLGenerator - OXF Protocol: Using ResourceManager for key /page-flow.xml
2014-10-24 11:52:53,592 DEBUG PageFlowControllerProcessor - processing page/service {controller: "oxf:/page-flow.xml", method: "PUT", path: "/mlc/test"}
2014-10-24 11
@acspike
acspike / gist:352ae483cf39cdc5233b
Created October 24, 2014 16:50
orbeon test #1
#######################################
# page-flow.xml
#######################################
<controller xmlns="http://www.orbeon.com/oxf/controller" matcher="regexp">
<service public-methods="GET HEAD POST PUT"
path="/mlc/test"
model="test.xpl"/>
<page path="/mlc/page"
@acspike
acspike / gist:7cdb82c73f09a911d1f1
Last active August 29, 2015 14:01
Using conditionals to light LEDs
int button = 2;
int led = 13;
int leds[] = {5,6,9,10,11};
int leds_count = 5;
int cursor = 0;
int direction = 1;
void setup() {
@acspike
acspike / cms_plugin_processors.py
Created May 22, 2014 12:23
templatish tags for text plugins to avoid fragile internal urls
import re
from cms.models.pagemodel import Page
from django.contrib.sites.models import Site
from django.utils.safestring import mark_safe
TAG = re.compile(r'''
\{% # opening
import re
tag = re.compile(r'\{% ?([^ ]+(?: [^ ]+)*) ?%\}')
rules = {
'static': lambda x: 'statistically',
'page': lambda x: 'paging '+x[0]+' up to',
}
def replace(m):
args = m.groups()[0].split(' ')
import select
import serial
serial_dev = '/dev/ttyS1'
select_timeout = 30
port = serial.Serial(serial_dev, timeout=None)
port.flushInput()