Skip to content

Instantly share code, notes, and snippets.

View simon04's full-sized avatar

Simon Legner simon04

  • Innsbruck, Austria
View GitHub Profile
@simon04
simon04 / 01-average-by-route.md
Last active April 12, 2016 18:12
Haltestellenabstände IVB aus OSM-Daten (https://www.openstreetmap.org/copyright, ODbL)
Average Route
286 m 1 Bergisel – Mühlauer Brücke
280 m 1 Mühlauer Brücke – Bergisel
326 m 3 Amras – Höttinger Au/West
326 m 3 Höttinger Au/West – Amras
1046 m 6 Bergisel – Igls
1046 m 6 Igls – Bergisel
403 m A Rum – Sadrach
461 m A Sadrach – Rum
/*
HotCat V2.33
Ajax-based simple Category manager. Allows adding/removing/changing categories on a page view.
Supports multiple category changes, as well as redirect and disambiguation resolution. Also
plugs into the upload form. Search engines to use for the suggestion list are configurable, and
can be selected interactively.
Documentation: https://commons.wikimedia.org/wiki/Help:Gadget-HotCat
List of main authors: https://commons.wikimedia.org/wiki/Help:Gadget-HotCat/Version_history
@simon04
simon04 / index.js
Created September 23, 2015 08:06
Angular: modify locale NUMBER_FORMATS for numberFilter
// https://github.com/angular/angular.js/pull/9160#issuecomment-68950547
// http://plnkr.co/edit/qvzXkQkVtTLHvHVYXTdU?p=preview
angular.module('foo', []).config(config);
function config($provide) {
$provide.decorator('numberFilter', function($delegate) {
$delegate.$stateful = true;
return $delegate;
});
{
"dependencies": {
"lodash": "^3.10.1",
"yamljs": "^0.2.3"
}
}
@simon04
simon04 / A-controller.js
Last active August 29, 2015 14:26
For gulp-angular-filesort/issues/26
angular.module('A').controller('C', function(data) {
document.write(data.x);
});
@simon04
simon04 / m4a2ogg
Created February 15, 2015 17:39
Converts m4a files to Ogg Vorbis using ffmpeg
#!/bin/bash
# Author: Simon Legner <Simon.Legner@gmail.com>
convert () {
in="$1"
out="${in%.m4a}.ogg"
ffmpeg -i "$in" \
-acodec libvorbis -aq 4 -vn -ac 2 \
-map_metadata 0 \
"$out"
@simon04
simon04 / Getting rid of "INFO: None-ODF attribute created for …".md
Last active November 7, 2021 00:22
Getting rid of "INFO: None-ODF attribute created for …"

I tried to get rid of the following messages by the Apache odfdom library.

Aug 20, 2014 8:55:45 AM org.odftoolkit.odfdom.pkg.OdfXMLFactory newOdfAttribute
INFO: None-ODF attribute created for calcext:value-type

Strangely, this did not work out …

java.util.logging.Logger.getLogger("org.odftoolkit").setLevel(java.util.logging.Level.WARNING);
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<link rel="stylesheet" href="http://josm.openstreetmap.de/mapsviewdata/ol.css" type="text/css">
<link rel="stylesheet" href="http://josm.openstreetmap.de/mapsview.css" type="text/css">
<script src="http://josm.openstreetmap.de/mapsviewdata/ol.js" type="text/javascript"></script>
<title>Geoimage.at MaxRes - JOSM - Imagery Preview</title>
</head>
# $Id: PKGBUILD 80202 2012-11-17 15:45:28Z eric $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
pkgname=pmount
pkgver=0.9.23
pkgrel=9
pkgdesc="mount removable devices as normal user"
arch=(i686 x86_64)
license=('GPL2')
url="http://pmount.alioth.debian.org/"
@simon04
simon04 / gist:6865179
Last active February 15, 2022 06:14
Gradle, Java plugin, Jar MANIFEST, Class-Path is empty

Gradle, Java plugin, Jar MANIFEST, Class-Path is empty

I struggled with with the jar MANIFEST file built with Gradle containing an empty Class-Path. I traced down the problem to the order of the dependencies and jar blocks in the build.gradle file:

Wrong (jar before dependencies):

jar {
    manifest.attributes(