Skip to content

Instantly share code, notes, and snippets.

@ryands
ryands / cloud-config.yml
Created May 26, 2016 19:38
example cloud-config
#cloud-config
coreos:
etcd2:
discovery: https://discovery.etcd.io/<some-discovery-token>
advertise-client-urls: http://\$private_ipv4:2379,http://\$private_ipv4:4001
initial-advertise-peer-urls: http://\$private_ipv4:2380
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
listen-peer-urls: http://\$private_ipv4:2380
units:
@ryands
ryands / Presenter.java
Created October 24, 2016 21:00
super simple base presenter (similar to Mortar's Presenter class)
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.View;
public abstract class Presenter<V extends View> {
private V view;
public final void takeView(@NonNull V view) {
if (view == null) throw new NullPointerException("View must not be null");
if (this.view != view) {
@ryands
ryands / Person.java
Last active March 24, 2017 19:16
kotlin blogpost - snippets
public class Person {
public final String name;
public final int age;
public final String city;
public Person(String name, int age, String city) {
this.name = name;
this.age = age;
this.city = city;
}
### Keybase proof
I hereby claim:
* I am ryands on github.
* I am ryands (https://keybase.io/ryands) on keybase.
* I have a public key ASAPVdyMPae0mgH03qbrDAal5GKi8SkCHyIyO_56yjsL0Ao
To claim this, I am signing this object:
@ryands
ryands / docker-compose.yml
Created August 9, 2018 00:19
gitlab-ce omnibus docker behind a local nginx reverse proxy (letsencrypt ssl termination at local nginx)
version: '3'
services:
gitlab:
image: gitlab/gitlab-ce:latest
hostname: gitlab.example.com
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.example.com/'
nginx['listen_port'] = 80
nginx['listen_https'] = false