Skip to content

Instantly share code, notes, and snippets.

Graham Cox sazzer

Block or report user

Report or block sazzer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sazzer
sazzer / unstateful containers.js
Created Mar 16, 2018
Can Unstateful Containers see each other?
View unstateful containers.js
type LoginProvidersState = {
+loadedState: string,
+providers: {
[key: string]: string
}
};
export class LoginProvidersContainer extends Container<LoginProvidersState> {
state = {
loadedState: PENDING,
View unicorns.java
import org.junit.Test;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class Unicorns {
@Test
public void patUnicorns() {
@sazzer
sazzer / gist:3396114
Created Aug 19, 2012
Loading Groovy scripts as classes at runtime
View gist:3396114
public class GroovyClassloaderTest {
@Test
public void loadGroovyScript() throws Exception {
CompilerConfiguration compilerConfiguration = new CompilerConfiguration();
compilerConfiguration.setClasspath("/base/directory/containing/groovy/files");
GroovyClassLoader gcl = new GroovyClassLoader(getClass().getClassLoader(), compilerConfiguration);
Class<?> cls = gcl.loadClass("SampleClass", true, true, true);
View gist:3316979
{
"title": "My Blog Post",
"author": {
"name": "Graham",
"link": "http://localhost:8080/authors/graham",
"id": "graham"
},
........
}
View badrestblog.json
{
"title": "My Blog Post",
"author": {
"name": "Graham",
"id": "graham"
},
........
}
You can’t perform that action at this time.