Skip to content

Instantly share code, notes, and snippets.

View rossdanderson's full-sized avatar
🕹️

Ross Anderson rossdanderson

🕹️
View GitHub Profile
---
version: "2"
services:
vpn:
image: bubuntux/nordvpn
container_name: vpn
cap_add:
- net_admin
devices:
- /dev/net/tun

Keybase proof

I hereby claim:

  • I am rossdanderson on github.
  • I am rossanderson (https://keybase.io/rossanderson) on keybase.
  • I have a public key ASD-9V_6tIoVE1UomEbkBKgnNQx2d7lTdoz_hg8mjzfGJwo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am rossdanderson on github.
  • I am rossdanderson (https://keybase.io/rossdanderson) on keybase.
  • I have a public key ASBe-EhJyrCyU8WiyCL3co_W_uK4CeiQEY3MigO-M58w7wo

To claim this, I am signing this object:

@rossdanderson
rossdanderson / SharedObservableCache.kt
Created April 24, 2016 13:46
Shares a number of underlying observables by provided keys Removes the underlying observable from the cache if there are no binding subscriptions to it, or if it terminates
package streams
import rx.Observable
import rx.observers.Subscribers.from
import rx.subscriptions.Subscriptions
import java.util.*
import java.util.concurrent.locks.ReentrantLock
import kotlin.concurrent.withLock
/**