Skip to content

Instantly share code, notes, and snippets.

View harrisony's full-sized avatar

Harrison Conlin harrisony

View GitHub Profile
@harrisony
harrisony / ColouredTabDividersCoverPage-10Tab.doc
Last active March 8, 2021 07:09
Marbig 10 tab coloured dividers latex
@harrisony
harrisony / JQ filter used with playlist json
Created July 13, 2017 03:52
Make Lecture Recordings Great Again
.section.presentations.pageContents[] | {title: .startTime, week: .week, url: "http://delivery.streaming.edu:1935/echo/_definst_/\( .thumbnails[0] | capture("https://delivery.streaming.edu/echo/(?<datecode>[0-9]+[0-9]+/[0-9])").datecode)/\(.uuid)/mp4:audio-vga-streamable.m4v/playlist.m3u8"} | "ffmpeg -i '\(.url)' -bsf:a aac_adtstoasc -acodec copy -c copy week-\(.week)-\(.title | scan("[0-9]{4}-[0-9]{2}-[0-9]{2}")).mp4"
@harrisony
harrisony / skim-2-oo4.scpt
Created May 8, 2016 03:31 — forked from DrLulz/skim-2-oo4.scpt
Creates OmniOutliner document with hierarchy based on color of Skim highlights.
tell application "System Events"
if not (exists process "OmniOutliner") then
do shell script "open -a \"OmniOutliner\""
end if
end tell
tell application "Skim"
set all_notes to every note of front document
set pdf_name to (name of front document)
#!/usr/bin/env python
# ReadingListCatcher
# - A script for exporting Safari Reading List items to Markdown and Pinboard
# Brett Terpstra 2015
# Uses code from <https://gist.github.com/robmathers/5995026>
# Requires Python pinboard lib for Pinboard.in import:
# `easy_install pinboard` or `pip install pinboard`
import plistlib
from shutil import copy
import subprocess
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@harrisony
harrisony / downforeveryoneorjustme.sh
Created April 7, 2013 01:26
quick down for everyone or just me check
#!/bin/sh
wget -q -O - "http://downforeveryoneorjustme.com/$1" | grep -E '.*class="domain"' | sed 's/<a href.*>\(.*\)<\/a>/\1/' | sed 's/<\/span>//'
@harrisony
harrisony / vcs-update.sh
Created March 31, 2013 08:44
A quickly hacked up script to update folders from VCS
#!/bin/sh
find $1 -mindepth 1 -maxdepth 1 -type d | while read -r dir
do
pushd "$dir"
echo $dir
if [[ -d ".git" ]]; then
git pull
fi
if [[ -d ".hg" ]]; then
hg pull
@harrisony
harrisony / TimezonePatch.diff
Last active December 11, 2015 03:09
make simplesamlphp less strict in timezone parsing
--- Utilities.php.orig 2013-01-17 13:50:22.892638237 +1100
+++ Utilities.php 2013-01-17 13:49:42.712169200 +1100
@@ -355,7 +355,7 @@
/* We use a very strict regex to parse the timestamp. */
if(preg_match('/^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)' .
- 'T(\\d\\d):(\\d\\d):(\\d\\d)(?:\\.\\d+)?$/D',
+ 'T(\\d\\d):(\\d\\d):(\\d\\d)(?:\\.\\d+)?(Z)?$/D',
$time, $matches) == 0) {
throw new Exception(
@harrisony
harrisony / gist:3877260
Created October 12, 2012 04:15
Awesome hacky code!
void list_generator(int (*process)(Record, string[]), string options[], string success, string failure){
bool _recordcount = 0;
Record processing[recordcount];
for (int i=0; i <= recordcount; i++){
if ((*process)(records[i], options) > 0){
processing[++_recordcount] = records[i];
}
}
if (_recordcount > 0){
cout << success;
Module ImplicitLineContinuations
'After a comma (,).
Public Function test1(ByVal x As Integer,
ByVal y As Object, ByVal z As Object)
Return 1
End Function
'After an open parenthesis (() or before a closing parenthesis ()).
Public Function test2(
ByVal x As Integer, ByVal y As Object, ByVal z As Object
)