Skip to content

Instantly share code, notes, and snippets.

View grkvlt's full-sized avatar
💭
🐧

Andrew Donald KENNEDY grkvlt

💭
🐧
View GitHub Profile
@grkvlt
grkvlt / atomicreference.java
Created October 12, 2017 15:03
Exploring Iterated Function Systems
private AtomicReferenceArray<Point2D> points = Atomics.newReferenceArray(2);
@grkvlt
grkvlt / attach.java
Created October 12, 2017 15:03
Exploring Iterated Function Systems
static <T> Property<T> attach(JComboBox<T> field) {
return new Property<T>() {
@SuppressWarnings(“unchecked”)
@Override
public T get() {
return (T) field.getSelectedItem();
}
@Override
public void set(T value) {
field.setSelectedItem(value);
@grkvlt
grkvlt / preferences.java
Last active October 15, 2017 20:19
Exploring Iterated Function Systems
public class Preferences extends AbstractPropertyDialog<Preferences> {
private final Property<Mode> mode;
private final Property<Render> render;
private final Property<CoordinateTransform.Type> transform;
// ...
}
@grkvlt
grkvlt / dialog.java
Last active October 15, 2017 20:19
Exploring Iterated Function Systems
/** Method to display the dialog box. */
void showDialog();
@Override
default T get() {
return (T) this;
}
static <T extends Dialog<T>> void show(Supplier<T> supplier,
BiConsumer<Throwable,String>...handlers) {
@grkvlt
grkvlt / gradient.java
Last active October 15, 2017 20:17
Exploring Iterated Function Systems Raw
public void setGradientStart(Color value) {
set(GRADIENT_START_PROPERTY, String.format("%06x", value.getRGB() & RGB24));
}
private <T> T cast(String value, Class<T> type) {
// ...
if (Color.class == type) {
return (T) Color.decode(Integer.toString(Integer.parseUnsignedInt(value, 16) & RGB24));
}
// ...
}
@grkvlt
grkvlt / explorer.properties
Created October 12, 2017 14:57
Exploring Iterated Function Systems
# Custom grid spacing.
explorer.grid.min = 25
explorer.grid.max = 100
explorer.window.width = 800
explorer.window.height = 800
explorer.debug = false
explorer.grid.snap = 5
@grkvlt
grkvlt / eventbus.java
Created October 12, 2017 14:56
Exploring Iterated Function Systems
/**
* {@link EventBus} subscription callbacks.
*
* @see Subscribe
*/
public interface Subscriber {
/** Callback for the IFS changes. */
void updated(IFS ifs);
/** Callback for display size changes. */
void resized(Dimension size);
@grkvlt
grkvlt / honest-achmed.txt
Created July 7, 2017 18:27
Honest Achmed's Used Cars and Certificates
This is a request to add the CA root certificate for Honest Achmed's Used Cars and Certificates. The requested information as per the CA information checklist is as follows:
1. Name
Honest Achmed's Used Cars and Certificates
2. Website URL
www.honestachmed.dyndns.org
@grkvlt
grkvlt / openshift.yaml
Last active April 10, 2017 23:01
OpenShift Origin on Blue Box with daily repave
id: openshift
name: "openshift"
description: |
Creates an OpenShift Origin 1.4.1 cluster with load balanced master servers
on CentOS 7 virtual machines in an IBM Blue Box OpenStack cloud.
Runs a scheduled repave on two machines every day at 16h00.
location:
ibm-bluebox-lon-vpn-centos
@grkvlt
grkvlt / red-box-openshift.yaml
Last active April 5, 2017 12:02
OpenShift Origin cluster on Red Box CentOS machines
id: openshift
name: "openshift"
description: |
Creates an OpenShift Origin cluster with load balanced master servers
on CentOS 7 virtual machines
location:
# aws-eu-central-1
rhel-london-pub-centos
# ibm-bluebox-lon-vpn-centos