Skip to content

Instantly share code, notes, and snippets.

Niclas Hoyer niclashoyer

  • Kiel, Germany
Block or report user

Report or block niclashoyer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
niclashoyer /
Last active Oct 15, 2019
Download a jamendo album as flac using the new v3.0 API (remember to insert your own application client id)
# deps: bash, curl, sed, metaflac, jq
# remember to insert your own application client id (see CLIENTID below)
# to get an application client id register at
set -e
set -u
function filtername() {
tr -cs "[:alnum:] \-&\(\)\?!" _
niclashoyer / sample gitignore for netbeans projects
Created Apr 12, 2011
gitignore for netbeans project that ignores generic configuration files that are generated by netbeans
View sample gitignore for netbeans projects
#ant specific
#netbeans specific
niclashoyer /
Last active Jan 19, 2018
Replace environment variables in configuration files with optional default using perl regular expressions.
# Replaces ${var:def} expressions in text files with environment variables with
# an optional default.
# Assuming VAR1 contains the value "foo" nad VAR2 is undefined, the following
# expressions will evaluate as given on the right side:
# ${VAR1} ~> foo
# ${VAR2:bar} ~> bar
niclashoyer /
Last active Jan 17, 2018
Quick hack for a redis like interface for IndexedDB
errs =
transaction: 'Operation not allowed during transaction'
wrongtype: 'Operation against a key holding the wrong kind of value'
notransaction: 'Operation not allowed without transaction'
notsupported: 'Operation not supported'
toomuchop: 'Operation with too much operands'
# calculate hamming weight (for BITCOUNT command)
# see
hamming = (x) ->
niclashoyer /
Last active Sep 15, 2016
L20n mixin for react.js (UNTESTED!)
@jsx React.DOM
L20nMixin =
context: React.PropTypes.any.isRequired
getInitialState: ->
if @props.getLocalizedEntities?
ids = @props.getLocalizedEntities()
niclashoyer /
Last active Aug 8, 2016
Fedora 19 Studio Setup

Fedora Studio Setup

niclashoyer / createevent.sparql
Created Jun 28, 2012
Example SPARQL Queries for Events
View createevent.sparql
PREFIX time:<>
PREFIX geo:<>
PREFIX foaf:<>
PREFIX xsd:<>
PREFIX event:<>
_:ev a event:Event ;
event:time _:time .
_:time a time:Interval ;
niclashoyer / hipache-docker
Last active Dec 28, 2015
Shell script to start a docker container and add it to hipache
View hipache-docker
# The MIT License (MIT)
# Copyright (c) <year> <copyright holders>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
niclashoyer / gist:7012182
Created Oct 16, 2013
Get all postboxes around Kiel, Germany
View gist:7012182[out:json];node[name%3DKiel]%3Bnode%28around%3A10000%29[amenity%3Dpost_box]%3Bout%3B
niclashoyer /
Created Aug 28, 2013
minimal in-memory nodejs ldp container implementation (incomplete)
# npm install connect
connect = require 'connect'
accept = [
You can’t perform that action at this time.