Skip to content

Instantly share code, notes, and snippets.

Avatar

Marius Hoch mariushoch

View GitHub Profile
@mariushoch
mariushoch / crontab
Last active Feb 12, 2022
Smoke tests for the Wikibase entity dump generation
View crontab
MAILTO=foo@bar.invalid
45 10 * * 4 nice -n19 bash $HOME/bin/wikibase-dump-generation-smoke-tests
@mariushoch
mariushoch / check-lexeme-json-dumps
Last active Feb 12, 2022
Check the Wikidata Lexeme JSON dumps each Thursday
View check-lexeme-json-dumps
#!/bin/bash
set -e
cd "$HOME/wikibase-validate-dump"
export https_proxy=http://webproxy:8080
git fetch
if [[ ! "$(git log HEAD..origin/master)" == "" ]]; then
echo "New commits, please rebase:"
@mariushoch
mariushoch / 0001-Compile-with-support-for-bytcr-wm5102-jack-detect.patch
Created Mar 22, 2021
Compile Fedora 33 kernel 5.11 with bytcr-wm5102 (including jack detect support) for Lenovo's Yoga Tablet 2
View 0001-Compile-with-support-for-bytcr-wm5102-jack-detect.patch
From b2df58f937bf6d9ea3891361e5edc037672b20f9 Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Sat, 6 Mar 2021 19:39:50 +0100
Subject: [PATCH] Compile with support for bytcr-wm5102+jack-detect
---
0001-YogaTablet2.patch | 2467 +++++++++++++++++++++++++++++++++++++++
filter-x86_64.sh.fedora | 4 +-
kernel-local | 18 +
kernel.spec | 4 +-
View 0001-Compile-with-support-for-bytcr-wm5102.patch
From 976ca0414020562c2efdc56e6605d136a2ba6eb5 Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Sat, 6 Mar 2021 19:39:50 +0100
Subject: [PATCH] Compile with support for bytcr-wm5102
---
0001-WM5102.patch | 1105 +++++++++++++++++++++++++++++++++++++++
Patchlist | 1 +
filter-x86_64.sh | 4 +-
filter-x86_64.sh.fedora | 4 +-
@mariushoch
mariushoch / README.md
Last active Jan 21, 2021
PropertySuggester update tools
View README.md

Step by step

  • Run ./scheduleUpdateSuggester 20180312 on tool forge (replace 20180312 with the date of the latest JSON dump)
  • Wait
  • Check the logs at updateSuggester.err for problems during the creation
  • Run sha1sum analyzed-out (or whatever hashing algorithm you prefer)
  • gzip analyzed-out
  • Rsync analyzed-out.gz to your local machine, commit to the wbs_propertypairs repo.
  • Load it down to terbium (or some other maintenance host) with https_proxy=http://webproxy.eqiad.wmnet:8080 wget 'https://github.com/wmde/wbs_propertypairs/raw/master/20180312/wbs_propertypairs.csv.gz' (again, replace 20180312 with the date of the JSON dump you produced).
  • Unpack it: gzip -d
  • Compare the checksum to the one obtained on tool forge
@mariushoch
mariushoch / benchmarkLuaEntitySerialization.php
Created Nov 15, 2019
Wikibase client "maintenance" script for benchmarking Lua serialiazation of entities
View benchmarkLuaEntitySerialization.php
<?php
namespace Wikibase;
use Deserializers\DispatchingDeserializer;
use Language;
use Maintenance;
use Wikibase\Client\WikibaseClient;
use Wikibase\Client\DataAccess\Scribunto\EntityAccessor;
use Wikibase\Client\Usage\HashUsageAccumulator;
@mariushoch
mariushoch / exgrep
Last active Dec 6, 2018
Searches MediaWiki exception.log(.gz) files for a specific exception string and prints the exception including stack trace.
View exgrep
#!/usr/bin/bash
if [[ "$1" == "" ]] || [[ "$2" == "" ]] || [[ "$1" == "--help" ]]; then
echo "Usage: $0 [-f] exception-log-file needle"
echo
echo "Searches exception.log(.gz) files for a specific exception string and prints the exception including stack trace."
echo "Use -f to follow newly added lines (like tail -f). Needle is case-sensitive."
exit
fi
@mariushoch
mariushoch / gist:72bb5edeca5ccd5c2eca
Last active Feb 21, 2016
MediaWiki: Add --profile-tests to phpunit.php
View gist:72bb5edeca5ccd5c2eca
From 5a02248b9e8671ac80a657c2c53229c688f033dd Mon Sep 17 00:00:00 2001
From: Marius Hoch <hoo@online.de>
Date: Sun, 21 Feb 2016 21:38:41 +0100
Subject: [PATCH] Add --profile-tests to phpunit.php
Change-Id: I4c9fcd6b90151b5b3b3dff65bfc0ce8589b7da7b
---
tests/phpunit/phpunit.php | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
View Current (rev 5224) Irssi FS#305 patch
Index: network-openssl.c
===================================================================
--- network-openssl.c (revision 5224)
+++ network-openssl.c (working copy)
@@ -50,6 +50,19 @@
int port;
} GIOSSLChannel;
+void irssi_redraw(void);
+
@mariushoch
mariushoch / vectorActions.js
Created Mar 23, 2013
Removes the actions drop down in the MediaWiki Vector skin in favour of a monobook-like menu
View vectorActions.js
/**
* Marius Hoch; 2013-03-24
* Removes the actions drop down in the MediaWiki Vector skin in favour of a monobook-like menu
*/
$( document ).ready( function() {
$( '#p-cactions' )
.hide()
.find( 'li' )
.each(
function( i, elem ) {