Skip to content

Instantly share code, notes, and snippets.

@michitux
michitux / rotate.patch
Created April 27, 2020 19:15
Patch to rotate resized images in DokuWiki based on EXIF orientation
--- a/inc/media.php 2018-12-28 17:46:14.000000000 +0100
+++ b/inc/media.php 2018-08-20 21:05:55.000000000 +0200
@@ -1084,6 +1084,15 @@
$w = (int) $info[0];
$h = (int) $info[1];
+ if ($meta) {
+ $orientation = media_getTag('Orientation', $meta);
+ if ($orientation == 3 || $orientation == 6) {
+ $tmp = $h;
@michitux
michitux / get_failing_tests.py
Created June 26, 2024 12:44
A script to get the maven commands of all failing tests of a Jenkins build
#!/usr/bin/env python
import requests
import collections
import argparse
def get_failing_tests_by_block(base_url):
url = base_url + '/testReport/api/json'
response = requests.get(url)