Skip to content

Instantly share code, notes, and snippets.

View nbransby's full-sized avatar

Nicholas Bransby-Williams nbransby

View GitHub Profile
@nbransby
nbransby / GitLive
Last active February 15, 2024 04:33
{"name":"GitLive","extensionswswsws
ws
ws
wsw
":"[{\"identifier\":{\"id\":\"teamhub.teamhub\",\"uuid\":\"9b05e859-b38c-450f-95d5-2800bed558ec\"},\"displayName\":\"GitLive\",\"version\":\"16.1.4\"}]"}
@nbransby
nbransby / Cucumber.java
Created June 2, 2018 10:02
testInstrumentationRunner (replacement for android.support.test.runner.AndroidJUnitRunner) and a org.junit.runner.Runner (replacement for cucumber.api.junit.Cucumber) that combines cucumber-android (2.40) and cucumber-junit (2.40) to run scenarios isolated in seperate processes via orchestrator 1.0.2
package cucumber.runtime.android;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.runner.Description;
import org.junit.runner.notification.RunNotifier;
MATCH (them:User)
//find out the lowest number of rating for any one of them
WITH them, min(size((them)<-[:RATED]-(:User))) as min_rating_count
//get all of them who share this lowest number of ratings
WITH them WHERE size((them)<-[:RATED]-(:User)) = min_rating_count RETURN them
# Welcome to Serverless!
#
# This file is the main config file for your service.
# It's very minimal at this point and uses default values.
# You can always add more config options for more control.
# We've included some commented out config examples here.
# Just uncomment any of them to get that config option.
#
# For full config options, check the docs:
# docs.serverless.com
@nbransby
nbransby / designer.html
Last active August 29, 2015 14:14
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<polymer-element name="my-element">
<template>
<style>
:host {
task translateJava(type:Exec) {
inputs.files configurations.runtime.allDependencies.dependencyProject.sourceSets.main.allJava.inject(sourceSets.main.allJava) { acc, val -> acc.plus(val) }
outputs.files files((configurations.runtime.allDependencies.dependencyProject.sourceSets.main.allJava + sourceSets.main.allJava).collect { i ->
i.collect { j ->
def name = j.path.replace(i.srcDirs.iterator().next().path, file('src/gen/objc').path)
return [name.replace('.java', '.h'), name.replace('.java', '.m')]
}
}.flatten())
executable System.getenv()['J2OBJC_HOME'] + '/j2objc'
args '--prefixes', file('src/main/resources/prefixes.properties').path