Skip to content

Instantly share code, notes, and snippets.

View avandeursen's full-sized avatar

Arie van Deursen avandeursen

View GitHub Profile
avandeursen /
Last active May 16, 2021 20:21
Reviewing for Elsevier

This little note is licensed under a Creative Commons CC0 License, meaning "No Rights Reserved". So you can reuse this note in whatever way you want, and there is no need to attribute me. Enjoy! :-)

Keybase proof

I hereby claim:

  • I am avandeursen on github.
  • I am avandeursen ( on keybase.
  • I have a public key ASDdpXh2rDOE3K7e1acPSmsRjUMbbyj0EGSEbaloHv64yAo

To claim this, I am signing this object:

avandeursen /
Last active June 19, 2021 08:53
Turn a publication list in an Elsevier Pure web page into a list of bibtex entries with urls back to Pure.
import sys
import requests
from bs4 import BeautifulSoup
# Set to the PURE page you'd like to get the bibtex entries from. Here's mine:
pure = ""
class BibTexEntry:
def __init__(self, entry):
avandeursen /
Created January 4, 2017 14:55 — forked from jacobsalmela/
Converts a DOC or DOCX to a PDF with a right-click
# Jacob Salmela
# 2016-03-12
# Convert annoying DOCX into PDFs with a right-click
# Run this as an Automator Service
###### SCRIPT #######
for f in "$@"
# Get the full file PATH without the extension
avandeursen / Vagrantfile
Last active October 10, 2018 06:55 — forked from reiz/gist:d67512deee814705134e
Vagrantfile for a Java dev. environment with Oracle Java 8, maven and git (and commands for Eclipse).
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config| = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
vb.gui = true
avandeursen / diffs.make
Last active January 25, 2018 08:03
Track-changes-like rendered diff for latex documents from two git versions.
# Simple set of make targets to create an msword-track-changes like
# diff for tex, based on two versions committed in git.
# Copyright (c) Arie van Deursen, 2014.
# Distributed under Apache License Version 2.0.
# Note: Either this Makefile should be the same in both the OLD and the NEW version,
avandeursen / JacocoTest
Created December 14, 2012 21:33
Simple test case that passes normally, but fails when run with Jacoco instrumentation enabled -- since Jacoco generates an extra synthetic method for the classes it instruments.
public class JacocoTest {
public static class NoMethods { }
@Test public void testDeclaredMethod() {
assertEquals(0, NoMethods.class.getDeclaredMethods().length);
} }