Skip to content

Instantly share code, notes, and snippets.

View heinrichreimer's full-sized avatar

Jan Heinrich Reimer heinrichreimer

View GitHub Profile
@heinrichreimer
heinrichreimer / SpanningGridLayoutManager.java
Last active March 11, 2024 08:26
GridLayoutManager implementation that stretches to fit all grid items on screen and disables scrolling. Useful for dashboards etc.
package com.example;
import android.content.Context;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.ViewGroup;
public class SpanningGridLayoutManager extends GridLayoutManager {
@heinrichreimer
heinrichreimer / LICENSE
Last active August 29, 2023 14:28
LinearLayoutManager implementation that stretches to fit all list items on screen and disables scrolling. Useful for dashboards etc.
MIT License
Copyright (c) 2020 Jan Heinrich Reimer
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
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@heinrichreimer
heinrichreimer / background_wallpaper_styles.xml
Created May 1, 2014 23:50
Use android wallpaper as activity background
<resources>
<style name="Configuration.Theme" parent="Configuration.Theme.Base">
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowShowWallpaper">true</item>
<item name="android:windowBackground">#1000</item>
</style>
</resources>
@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 / EsSparkExtensions.kt
Created April 1, 2020 22:37
Elasticsearch Spark extension functions for Kotlin.
package de.webis.webisstud.thesis.reimer.clueweb.graph
import org.apache.spark.SparkConf
import org.apache.spark.api.java.JavaPairRDD
import org.apache.spark.api.java.JavaRDD
import org.apache.spark.api.java.JavaSparkContext
import org.elasticsearch.hadoop.cfg.ConfigurationOptions.*
import org.elasticsearch.spark.rdd.api.java.JavaEsSpark
fun JavaSparkContext.esRDD(): JavaPairRDD<String, Map<String, Any>> =
@heinrichreimer
heinrichreimer / keybase.md
Created February 12, 2020 08:49
Keybase proof

Keybase proof

I hereby claim:

  • I am heinrichreimer on github.
  • I am heinrichreimer (https://keybase.io/heinrichreimer) on keybase.
  • I have a public key ASBY23krwrFBLQ-MswPfhYQ1Gv8KMy9-fNP0dzT4wuj1cgo

To claim this, I am signing this object:

@heinrichreimer
heinrichreimer / AddOnlyCollections.kt
Created January 20, 2020 11:22
Add-only Kotlin collections.
package de.webis.webisstud.thesis.reimer
/**
* A generic collection of elements that supports adding elements.
*
* @param E the type of elements contained in the collection.
* The mutable collection is invariant on its element type.
*/
interface AddOnlyCollection<E> : Collection<E> {
@heinrichreimer
heinrichreimer / CLA.md
Last active January 2, 2020 21:52
Contributor License Agreement (Jan Heinrich Reimer)

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 Jan Heinrich Reimer'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/heinrichreimer/.

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.

@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.