Skip to content

Instantly share code, notes, and snippets.

View heinrichreimer's full-sized avatar

Jan Heinrich Reimer heinrichreimer

View GitHub Profile
@heinrichreimer
heinrichreimer / DataBindingFragment.java
Created March 21, 2017 15:42
Fragment class for using data binding to replace view inflation.
package foo.bar;
import android.databinding.ViewDataBinding;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@heinrichreimer
heinrichreimer / DataBindingRecyclerViewAdapter.java
Last active March 23, 2017 02:22
RecyclerView adapter class for using data binding to replace view inflation.
package foo.bar;
import android.databinding.DataBindingUtil;
import android.databinding.ViewDataBinding;
import android.support.annotation.LayoutRes;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import java.util.List;
@heinrichreimer
heinrichreimer / refresh-portfolio.sh
Created February 4, 2018 00:25
Script that runs on my web server and fetches, builds and deploys my personal portfolio. Portfolio sources can be found here: https://github.com/heinrichreimer/heinrichreimer.github.io
#!/usr/bin/env bash
set -e # Halt script on error.
# GitHub repo to fetch the portfolio from.
PORTFOLIO_REPO_USERNAME=heinrichreimer
PORTFOLIO_REPO_NAME=heinrichreimer.github.io
# Path to deploy the portfolio to.
PORTFOLIO_DEPLOY_PATH=~/www/heinrichreimer.com
@heinrichreimer
heinrichreimer / Wysker_Launchfilm_1_1_4_Metadata.xml
Created February 14, 2018 14:19
Metadata embedded into the Wysker_Launchfilm_1_1_4.mp4 file of the Wysker treasure hunt: https://www.youtube.com/watch?v=Ajhyirdd9CE
<?xml version="1.0"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c143 79.161210, 2017/08/11-10:28:36 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpDM="http://ns.adobe.com/xmp/1.0/DynamicMedia/" xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/" xmlns:illustrator="http://ns.adobe.com/illustrator/1.0/" xmlns:xmpGImg="http://ns.adobe.com/xap/1.0/g/img/" xmlns:xmpG="http://ns.adobe.com/xap/1.0/g/" xmlns:creatorAtom="http://ns.adobe.com/creatorAtom/1.0/" xmlns:bext="http://ns.adobe.com/bwf/bext/1.0/" xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/" xmlns:tiff="http://ns.adobe.com/t
@heinrichreimer
heinrichreimer / gist:0c84119ab9de42fd371918f2e9fb024d
Created April 6, 2018 15:44
Delete unused, pre-installed Windows Apps
Get-AppxPackage -allusers *Microsoft.BingWeather* | Remove-AppxPackage
Get-AppxPackage -allusers *Microsoft.WindowsMaps* | Remove-AppxPackage
Get-AppxPackage -allusers *Microsoft.Messaging* | Remove-AppxPackage
Get-AppxPackage -allusers *Microsoft.ZuneVideo* | Remove-AppxPackage
Get-AppxPackage -allusers *Microsoft.OneConnect* | Remove-AppxPackage
Get-AppxPackage -allusers *Microsoft.ZuneMusic* | Remove-AppxPackage
Get-AppxPackage -allusers *Microsoft.GetHelp* | Remove-AppxPackage
Get-AppxPackage -allusers *Microsoft.People* | Remove-AppxPackage
Get-AppxPackage -allusers *Microsoft.WindowsCommunicationsApps* | Remove-AppxPackage
Get-AppxPackage -allusers *Microsoft.WindowsFeedbackHub* | Remove-AppxPackage
@heinrichreimer
heinrichreimer / LiveEventBus.kt
Last active August 20, 2018 12:16
Simple event bus based on Android Architecture Component's LiveData. The code is initially based on Alfonz' LiveBus (https://github.com/petrnohejl/Alfonz/blob/dev/alfonz-arch/src/main/java/org/alfonz/arch/event/LiveBus.java) and was optimized for usage in Kotlin. This class needs Google's SingleLiveEvent (https://github.com/googlesamples/android…
import android.arch.lifecycle.LifecycleOwner
import android.arch.lifecycle.Observer
import android.support.annotation.MainThread
import android.support.v4.util.ArrayMap
class LiveEventBus {
private val events: MutableMap<Class<out Any>, SingleLiveEvent<out Any>> =
ArrayMap<Class<out Any>, SingleLiveEvent<out Any>>()
@MainThread
@heinrichreimer
heinrichreimer / download-all-exercises.py
Created June 11, 2019 01:34
Script to download a student's exercise solutions and task information from Martin Luther University Halle's Institute for Computer Science's exercise portal.
import json
import os
import re
import shutil
import tempfile
import typing
import zipfile
import pyquery
import requests
@heinrichreimer
heinrichreimer / inline-list.scss
Created November 15, 2019 12:28
Formatting HTML lists inline.
ul {
display: inline;
list-style: none;
padding: 0;
> li {
display: inline;
&:before {
display: inline;
@heinrichreimer
heinrichreimer / CLA.md
Last active January 2, 2020 21:46
Contributor License Agreement (Reimer Software)

Fiduciary License Agreement 2.0

(Based on the Individual Contributor exclusive License Agreement, including the Traditional Patent License option)

Thank you for your interest in contributing to Reimer Software's GitHub open source projects ("We" or "Us").

The purpose of this contributor agreement ("Agreement") is to clarify and document the rights granted by contributors to Us. To make this document effective, please follow the instructions at https://cla-assistant.io/reimersoftware/.

Preamble

Software is deeply embedded in all aspects of our lives and it is important that it empower, rather than restrict us. Free Software gives everybody the rights to use, understand, adapt and share software. These rights help support other fundamental freedoms like freedom of speech, press and privacy.