Skip to content

Instantly share code, notes, and snippets.

View janmattfeld's full-sized avatar

Jan-Henrich Mattfeld janmattfeld

View GitHub Profile
@janmattfeld
janmattfeld / wifionice
Created June 19, 2018 15:52 — forked from TimKraemer/wifionice
HowTo auto connect your Linux to the German Wifi on ICE trains
#!/bin/sh
# put this file in /etc/network/if-up.d/
if iwconfig wlp4s0 | grep -c "ESSID:\"WIFIonICE\""
then
curl -s "https://www.ombord.info/hotspot/hotspot.cgi?connect=&method=login&realm=db_advanced_wifi"
fi
@janmattfeld
janmattfeld / data.json
Created March 6, 2018 18:21 — forked from gkatsaros/data.json
OCCI diagram visualisation using D3.js library
[
{
"actions": [],
"attributes": {
"occi.agreement.term.state": " undefined",
"occi.agreement.termtype": " SLO",
"occi.core.id": "/agreement/b66c57ec-1ddd-4e21-a173-c6339298dcf7",
"serviceprovider.terms.compute.uptime": " 99"
},
"kind": {
@janmattfeld
janmattfeld / .gitlab-ci.yml
Created October 21, 2017 18:40
OpenUI5 Explored Build and Deploy on GitLab CI
image: node:latest
cache:
paths:
- node_modules/
before_script:
- apt-get update
- apt-get install sshpass -y
- mkdir -p ~/.ssh
@janmattfeld
janmattfeld / add_shadow.sh
Created December 1, 2016 10:36
Adds a shadow frame around pictures
#!/bin/bash
pathname="$1"
noext="${pathname%.*}"
convert $pathname \( +clone -background grey35 -shadow 80x40+5+5 \) \
+swap -background transparent -layers merge +repage "$noext-shadow.png"
@janmattfeld
janmattfeld / endian.c
Created October 31, 2016 21:25
Detecting a system's endianness in C
/***********************************************
* Name: endian.c
* Purpose: Detecting system endianness
* Source: GNU C / IBM XLC
* Build: gcc -o endian endian.c
* Author: Jan-Henrich Mattfeld
* Date: 2016-10-31
***********************************************/
#include <stdio.h>