Skip to content

Instantly share code, notes, and snippets.

Avatar

Simon Legner simon04

  • Innsbruck, Austria
View GitHub Profile
View package.json
{
"dependencies": {
"lodash": "^3.10.1",
"yamljs": "^0.2.3"
}
}
View x.html
<!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>
@simon04
simon04 / A-controller.js
Last active Aug 29, 2015
For gulp-angular-filesort/issues/26
View A-controller.js
angular.module('A').controller('C', function(data) {
document.write(data.x);
});
@simon04
simon04 / index.js
Created Sep 23, 2015
Angular: modify locale NUMBER_FORMATS for numberFilter
View index.js
// 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;
});
@simon04
simon04 / maven2gradle.sh
Created Jan 27, 2013
A basic conversion script from Maven to Gradle dependencies
View maven2gradle.sh
#!/bin/sh
echo 'dependencies {'
xmlstarlet sel -T \
-N pom="http://maven.apache.org/POM/4.0.0" \
-t -m '//pom:dependency' \
-o " compile '" \
-v 'pom:groupId' \
-o ':' \
-v 'pom:artifactId' \
-o ':' \
@simon04
simon04 / PKGBUILD
Last active Dec 18, 2015
Arch Linux PKGBUILD for tpfanco-svn 89-5
View PKGBUILD
# Contributor: Andreas Wagner <Andreas dot Wagner at em dot uni-frankfurt do de>
pkgname=tpfanco-svn
pkgver=89
pkgrel=5
pkgdesc="Monitors temperatures and controls fan speed of IBM/Lenovo ThinkPad notebooks."
replaces=('tpfand')
provides=('tpfanco')
conflicts=('tpfanco' 'tpfand-no-hal' 'tpfand' 'tpfand-profiles' 'tpfan-admin')
depends=('python2-dmidecode-git' 'python2-dbus' 'pygtk' 'python2-rsvg' 'python2-dbus')
@simon04
simon04 / gist:6825106
Created Oct 4, 2013
Fix pts and urxvt on Arch Linux
View gist:6825106

Since recently I struggled with:

$ urxvt
urxvt: can't initialize pseudo-tty, aborting.

$ sudo mount -a
mount: none is already mounted or /dev/pts busy
View PKGBUILD
# $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/"
View MediaWiki:Gadget-HotCat.js
/*
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 / 01-average-by-route.md
Last active Apr 12, 2016
Haltestellenabstände IVB aus OSM-Daten (https://www.openstreetmap.org/copyright, ODbL)
View 01-average-by-route.md
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