Skip to content

Instantly share code, notes, and snippets.

@aubryll
aubryll / ListAdapterWithHeader.java
Created Nov 24, 2019
This is the Java version of NickHolcombe's ListAdapterWithHeader which was originally wrote in Kotlin, after spending countless hours online looking for a way to add a header to my PagedListAdapter I finally found a solution https://gist.github.com/NickHolcombe/0e1c27892d6b73271f10e12268f40187 except it was in Kotlin, I managed to rewrite it in …
View ListAdapterWithHeader.java
import androidx.recyclerview.widget.AsyncDifferConfig;
import androidx.recyclerview.widget.AsyncListDiffer;
import androidx.recyclerview.widget.DiffUtil;
import androidx.recyclerview.widget.ListUpdateCallback;
import androidx.recyclerview.widget.RecyclerView;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
import kotlin.jvm.internal.Intrinsics;
@pantsel
pantsel / docker-compose.yml
Last active Nov 12, 2022
example docker-compose.yml for kong, postgres and konga
View docker-compose.yml
version: "3"
networks:
kong-net:
driver: bridge
services:
#######################################
# Postgres: The database used by Kong
@NickHolcombe
NickHolcombe / ListAdapterWithHeader.kt
Last active Nov 18, 2022
Example of a RecyclerView Adapter based on ListAdapter with a header
View ListAdapterWithHeader.kt
package example
import android.support.v7.recyclerview.extensions.AsyncDifferConfig
import android.support.v7.recyclerview.extensions.AsyncListDiffer
import android.support.v7.util.DiffUtil
import android.support.v7.util.ListUpdateCallback
import android.support.v7.widget.RecyclerView
/**
* {@link RecyclerView.Adapter RecyclerView.Adapter} base class based on
@aluanhaddad
aluanhaddad / Example.cs
Created Nov 22, 2017
C# Observable HTTP
View Example.cs
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Collections.Immutable;
using System.Linq;
using System.Net.Http;
using System.Reactive;
using System.Reactive.Concurrency;
using System.Reactive.Disposables;
using System.Reactive.Joins;
using System.Reactive.Linq;