Skip to content

Instantly share code, notes, and snippets.

View n0m0r3pa1n's full-sized avatar

Georgi Mirchev n0m0r3pa1n

View GitHub Profile
@joaocsousa
joaocsousa / CacheObservable.java
Created September 28, 2017 21:16
CacheObservable that allows you to cache an emission for a certain period of time
import java.util.concurrent.TimeUnit;
import io.reactivex.Observable;
import io.reactivex.ObservableSource;
import io.reactivex.ObservableTransformer;
import io.reactivex.Observer;
import io.reactivex.functions.Consumer;
public static class CacheObservable<T> implements ObservableTransformer<T, T> {
private final long timeout;
@brenopolanski
brenopolanski / merge-pdf-ghostscript.md
Last active May 2, 2024 06:56
Merge multiple PDFs using Ghostscript

A simple Ghostscript command to merge two PDFs in a single file is shown below:

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combine.pdf -dBATCH 1.pdf 2.pdf

Install Ghostscript:

Type the command sudo apt-get install ghostscript to download and install the ghostscript package and all of the packages it depends on.