Skip to content

Instantly share code, notes, and snippets.

View avandeursen's full-sized avatar

Arie van Deursen avandeursen

View GitHub Profile
@avandeursen
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);
} }
@avandeursen
avandeursen / diffs.make
Last active January 25, 2018 08:03
Track-changes-like rendered diff for latex documents from two git versions.
MAKEFILE=$(lastword $(MAKEFILE_LIST))
# 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.
# https://www.apache.org/licenses/LICENSE-2.0
#
# Note: Either this Makefile should be the same in both the OLD and the NEW version,
@avandeursen
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|
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
vb.gui = true
@avandeursen
avandeursen / convertDOCXtoPDF.sh
Created January 4, 2017 14:55 — forked from jacobsalmela/convertDOCXtoPDF.sh
Converts a DOC or DOCX to a PDF with a right-click
#!/bin/bash
# Jacob Salmela
# 2016-03-12
# Convert annoying DOCX into PDFs with a right-click
# Run this as an Automator Service
###### SCRIPT #######
for f in "$@"
do
# Get the full file PATH without the extension
@avandeursen
avandeursen / pure2bibtex.py
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 = "https://pure.tudelft.nl/portal/en/persons/a-van-deursen(949eb2cc-4db0-4f33-bd56-13425fa5c24a)/publications.html?page=0"
class BibTexEntry:
def __init__(self, entry):

Keybase proof

I hereby claim:

  • I am avandeursen on github.
  • I am avandeursen (https://keybase.io/avandeursen) on keybase.
  • I have a public key ASDdpXh2rDOE3K7e1acPSmsRjUMbbyj0EGSEbaloHv64yAo

To claim this, I am signing this object:

@avandeursen
avandeursen / LICENSE.md
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! :-)