Skip to content

Instantly share code, notes, and snippets.

View wadoon's full-sized avatar

Alexander Weigl wadoon

View GitHub Profile
@wadoon
wadoon / snippet.js
Last active December 1, 2025 14:06
Retrieve the git repositories from your Overleaf project page for mass backup
/* Execute the following line in your Javascript console on your Overleaf project page.
After you have unfold all of your projects.
*/
document.querySelectorAll(".dash-cell-name a").forEach((a) => console.log("git clone https://[email protected]/"+a.href.substr(33) +" '"+ a.text+"'"))
@wadoon
wadoon / README.md
Created February 3, 2025 06:06
Helmholtz Reporting via Latex

How to make Helmholtz reporting with LaTeX if the final document should be in Word.

Benefits

  • You can write collaboratively using Overleaf
  • Your bibliography is managed. You gain a list of referenced papers.

The process

  1. Use a special preamble to customize everything to the needs:
@wadoon
wadoon / testdocxurl.py
Created February 3, 2025 05:49
Scripts for testing URLs inside of docx files for the status code.
#!/usr/bin/env python3
# pip install --user python-docx
from docx import Document
from docx.opc.constants import RELATIONSHIP_TYPE as RT
import sys
def iter_hyperlink_rels(rels):
for rel in rels:
if rels[rel].reltype == RT.HYPERLINK:
@wadoon
wadoon / mima.c
Last active December 18, 2022 23:40
#include <assert.h>
#include <stdint.h>
#include <stdbool.h>
/*
OpCode mnemonik Description
0 LDC c c ⟶ Acc
1 LDV a < a > ⟶ Acc
2 STV a Acc ⟶ < a >
3 ADD a Acc + < a > ⟶ Acc
#!/bin/bash
echo "Review Script."
REVIEW_BASE=${REVIEW_BASE:-master}
if [ ! -z $1 ]; then
git switch $1 || exit 1
fi
/*@ normal_behaviour
@ requires true;
@ ensures \result <==> (\exists int i; 0 <= i && i < arr.length; arr[i] != id);
@ assignable \strictly_nothing;
@*/
private boolean contains(int[] arr, int id) {
/*@ loop_invariant (\forall int k; 0 <= k && k < i; arr[k] != id);
@ loop_invariant 0 <= i && i <= arr.length + 1;
@
@ decreases arr.length - i;
@wadoon
wadoon / key.sublime-syntax
Created February 20, 2020 16:01
Syntax Highlighting for Key files usable by bat
%YAML 1.2
---
name: KeY
file_extensions: [key]
scope: source.key
contexts:
main:
- match: '"'
scope: punctuation.definition.string.begin
@wadoon
wadoon / javajml.sublime-syntax
Created February 20, 2020 16:00
Syntax Highlighting for Java+JML
%YAML 1.2
---
name: JavaJml
file_extensions:
- java
- jml
scope: source.java
contexts:
@wadoon
wadoon / README.md
Last active December 4, 2018 11:34 — forked from EronWright/README.md
Simple Maven repository hosted on Apache httpd web server

Simple Maven Repository

Hosting a shared Maven repository on a remote server may be accomplished with a simple web server such as Apache HTTP server. This works because most of the resolution and publishing logic of Maven is implemented in the client.
By using a small helper, this solution works fully automatically.

Caution: this example exposes a writable directory without any authentication. You need protect the PUT method via the apache configuration.

Configure Apache HTTP

@wadoon
wadoon / Checkstyle.xml
Created November 24, 2016 17:41
Maven Snippets
https://maven.apache.org/plugins/maven-checkstyle-plugin/
<project>
...
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>