Skip to content

Instantly share code, notes, and snippets.

@Yogsther
Yogsther / hbomax_ultrawide.json
Created January 25, 2022 20:42
21:9 support for HBO MAX (Ultrawide aspect ratio)
{"userCSSoptions":{"theme":"default","font":"font%3A%2016px%2F20px%20monospace","width":"400","height":"300","dock":"right","opacity":"100"},"userCSSstyles":[{"site":"play.hbomax.com","styles":"video{\n height: calc(100vh * 1.238) !important;\n top: calc(-100vh * 0.238/2) !important;\n}","toggle":1}]}
@mttkay
mttkay / Pager.java
Created November 4, 2015 15:46
A simple Rx based pager
public class Pager<I, O> {
private static final Observable FINISH_SEQUENCE = Observable.never();
private PublishSubject<Observable<I>> pages;
private Observable<I> nextPage = finish();
private Subscription subscription = Subscriptions.empty();
private final PagingFunction<I> pagingFunction;
private final Func1<I, O> pageTransformer;
@paulirish
paulirish / what-forces-layout.md
Last active November 20, 2024 09:27
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@gsoltis
gsoltis / RxFirebase.java
Last active May 6, 2024 03:16
RxJava Bindings for Firebase
package com.firebase.client;
import com.firebase.client.core.Constants;
import rx.Observable;
import rx.Subscriber;
import rx.functions.Action0;
import rx.functions.Func1;
import rx.subscriptions.Subscriptions;
public class RxFirebase {