Skip to content

Instantly share code, notes, and snippets.

@NeutralKaon
NeutralKaon / TMS-Hax.js
Created March 5, 2022 22:09
Oxford TMS quality of life improvements.
// ==UserScript==
// @name TMS-Hax
// @namespace https://tms.ox.ac.uk tms.ox.ac.uk
// @description Quality of life hax
// @include https://tms.ox.ac.uk/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// ==/UserScript==
// This is a quality of life script for the rather unfortunately terrible site tms.ox.ac.uk
// Use with greasemonkey or tampermonkey
@NeutralKaon
NeutralKaon / Extracty.R
Created October 16, 2023 23:16
Extract EndNote citations from a word document
library(xml2)
library(magrittr)
library(RCurl)
# This is a clean room reverse-engineered for compatibility and interoperability crude-yet-effective extractor for embedded citations created by end note in a word document. This is useful if you wish to e.g. rewrite the word document in LaTeX and import the same citations en block (via xml).
# EC 2009/24/EC states "The person having a right to use a copy of a computer program shall be entitled, without the authorisation of the rightholder, to observe, study or test the functioning of the program in order to determine the ideas and principles which underlie any element of the program if he does so while performing any of the acts of loading, displaying, running, transmitting or storing the program which he is entitled to do."
# Don't sue me!
# So, to extract references from a word document sent to you:
#docx <- yourdocx