Skip to content

Instantly share code, notes, and snippets.

View coreagile's full-sized avatar

Stephen Starkey coreagile

View GitHub Profile
@coreagile
coreagile / keybase.md
Created April 12, 2018 12:29
Keybase Gist

Keybase proof

I hereby claim:

  • I am coreagile on github.
  • I am scstarkey (https://keybase.io/scstarkey) on keybase.
  • I have a public key ASBiZcgVHsbV9oKIE7w-RbfyqOKByM4yzdRgBqJWMvwUfwo

To claim this, I am signing this object:

@coreagile
coreagile / lein 2.8.0 debugging
Created October 19, 2017 00:15
leiningen 2.8.0 issues
$ /usr/libexec/java_home -V
Matching Java Virtual Machines (4):
9.0.1, x86_64: "Java SE 9.0.1" /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home
1.8.0_152, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home
1.8.0_131, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
1.8.0_74, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home
$ java -version
@coreagile
coreagile / Customer.java
Created August 18, 2016 20:09
A simple strategy pattern implementation
import java.util.ArrayList;
import java.util.List;
/**
* Java doesn't have persistent data structures. I would use them if I could,
* but this is just a snippet.
* <p>
* This class is not thread-safe.
*
* Adapted from
@coreagile
coreagile / gist:86bcab63dc9097715ca1
Last active August 29, 2015 14:13
A response to a blog post by @unclebob on how interfaces are harmful...
import java.util.function.Consumer;
/**
* "Observers done correctly" according to
* <p>
* http://blog.cleancoder.com/uncle-bob/2015/01/08/InterfaceConsideredHarmful.html
*/
public class Main {
public static interface Observer {
public void update();
@coreagile
coreagile / hack-workaround.diff
Last active August 29, 2015 14:08
Trouble with introducing core.typed using TDD
# Introducing core.typed in this patch:
# https://github.com/courage-labs/freefrog/commit/cf81d1435d364e5da6be3d11714c79de14f6ef57
# Causes this unexpected result (I was hoping it would tell me that this namespace wasn't annotated
# how do I do that?):
Stephen-Starkeys-MacBook-Air-11:freefrog scstarkey$ lein spec spec/freefrog/governance_spec.clj
Initializing core.typed ...
Building core.typed base environments ...
Finished building base environments