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
niclashoyer / colour-light.vim
Last active Aug 29, 2015
light colorscheme for vim
View colour-light.vim
" Vim color file colour light
" generated by VimTax http://www.vimtax.com
set background=light
hi clear
if exists("syntax_on")
syntax reset
endif
set t_Co=256
let colors_name = "colour-light"
@niclashoyer
niclashoyer / backup.sh
Last active Aug 29, 2015
Simple docker backup
View backup.sh
#!/bin/bash
set -e
set -u
CONTAINER=$(docker ps -a --no-trunc | awk 'NR>1' | awk 'BEGIN {FS=" +"}; $5 ~ "^Up" {print $1}')
for C in $CONTAINER; do
echo "Backup for $C"
DATA=$(docker inspect $C)
View docker-snippets.sh
# get volumes for a container
docker inspect $container | jq '.[].Volumes|to_entries[].key'
View ndrhd.sh
#!/bin/bash
curl -s http://www.ndr.de/sport/live/index.html | sed -n -e 's/.*\(http:\/\/.*akamaihd.*\.m3u8\).*/\1/p'
@niclashoyer
niclashoyer / keybase.md
Created Sep 22, 2014
keybase.io GitHub verification
View keybase.md

Keybase proof

I hereby claim:

  • I am niclashoyer on github.
  • I am niclashoyer (https://keybase.io/niclashoyer) on keybase.
  • I have a public key whose fingerprint is 7693 6404 9CAC 6CED BC02 C3E4 EDCE 346C 637C 3F49

To claim this, I am signing this object:

@niclashoyer
niclashoyer / ioreg-svd.py
Last active Aug 29, 2015
Generating ioregs! macros from SVD files
View ioreg-svd.py
from cmsis_svd.parser import SVDParser
def getaccess(field):
if field.access == 'read-only':
return ': ro'
if field.access == 'write-only':
return ': wo'
return ''
def getoffset(field):
@niclashoyer
niclashoyer / gen-webid-cert.sh
Created Apr 26, 2012 — forked from njh/_README.md
Shell script to create a WebID certificate using OpenSSL
View gen-webid-cert.sh
#!/bin/sh
#
# gen-webid-cert.sh: WebID Self-signed Certificate Generator
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
@niclashoyer
niclashoyer / githubtags.php
Created Jun 15, 2012
Get Tags of a GitHub Repository with links to Tarballs
View githubtags.php
#!/usr/bin/env php
<?php
$user = 'symfony';
$repo = 'symfony';
$url = 'https://api.github.com/repos/'.$user.'/'.$repo.'/tags';
$json = file_get_contents($url);
@niclashoyer
niclashoyer / lsdumps.sh
Created Jun 16, 2012
Display gzipped SQL dumps from folder
View lsdumps.sh
#!/bin/bash
dir=/path/to/dumps
ending=sql.bz2
cd $dir
for file in *.$ending; do
time=$(date -d @`stat $file -c %Y` +%T)
size=$(du -sh $file | awk '{print $1}')
name=${file%%.$ending}
@niclashoyer
niclashoyer / classprop.sparql
Created Jun 22, 2012
SPARQL Query for Retrieving Classes with Properties
View classprop.sparql
PREFIX dc:<http://purl.org/dc/elements/1.1/>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX time:<http://www.w3.org/2006/time#>
PREFIX geo:<http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX foaf:<http://xmlns.com/foaf/0.1/>
PREFIX event:<http://purl.org/NET/c4dm/event.owl#>
PREFIX owl:<http://www.w3.org/2002/07/owl#>
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX vs:<http://www.w3.org/2003/06/sw-vocab-status/ns#>
select distinct ?class ?property ?label
You can’t perform that action at this time.