Skip to content

Instantly share code, notes, and snippets.

Loving SvelteJS

Antony Jones antony

Loving SvelteJS
View GitHub Profile
View gist:ed4fba9be0d25099846e
### Keybase proof
I hereby claim:
* I am antony on github.
* I am aiten ( on keybase.
* I have a public key whose fingerprint is 17B8 82E3 9AE7 A87E 11FE 4F78 DEEF 31AE A794 9547
To claim this, I am signing this object:
antony / gist:282033be1dae877fea45
Created Oct 10, 2014
Create a Jenkins view filter.
View gist:282033be1dae877fea45
You need to install the 'anything-goes' plugin and enable it, first:
Then click 'edit description' on your view, and just paste this whole file into it and click save.
Done. Type to filter.
<input class="search" placeholder="Type to filter..." style="font-size: 24px; padding: 10px; height: 50px; width: 100%;" autofocus />
!function(){function a(b,c,d){var e=a.resolve(b);if(null==e){d=d||b,c=c||"root";var f=new Error('Failed to require "'+d+'" from "'+c+'"');throw f.path=d,f.parent=c,f.require=!0,f}var g=a.modules[e];if(!g._resolving&&!g.exports){var h={};h.exports={},h.client=h.component=!0,g._resolving=!0,,h.exports,a.relative(e),h),delete g._resolving,g.exports=h.exports}return g.exports}a.modules={},a.aliases={},a.resolve=function(b){"/"===b.charAt(0)&&(b=b.slice(1));for(var c=[b,b+".js",b+".json",b+"/index.js",b+"/index.json"],d=0;d<c.length;d++){var b=c[d];if(a.modules.hasOwnProperty(b))return b;if(a.aliases.h
View harrypotter.adoc

Modelling Family, Friends, Enemies, Pets and Deaths in the Wizarding World


antony / grails-geb
Created Feb 14, 2012
A properly configured BuildConfig.groovy for running Geb under Grails 2.0
View grails-geb
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.dependency.resolution = {
inherits("global") {
log "warn"
antony / ExampleTemplateRenderingHelperSpec.groovy
Created Oct 21, 2015
Handlebars Testing Framework for Ratpack
View ExampleTemplateRenderingHelperSpec.groovy
package pm.renderer.handlebars
import com.github.jknack.handlebars.Handlebars
import com.github.jknack.handlebars.Options
import com.github.jknack.handlebars.Template
import ratpack.handlebars.NamedHelper
import spock.lang.Ignore
class ExampleTemplateRenderingHelperSpec extends HandlebarsSpecification<TemplateRenderingHelper, String> {
antony / spock.sjs
Last active Nov 21, 2015
Writing spock language in javascript with sweet.js (WIP)
View spock.sjs
let spec = macro {
rule { $name:lit { $body ... } } => {
describe($name, function () {
$body ...
antony / ShiroAwareSpecification.groovy
Created Nov 30, 2015
Unit Testing Shiro Subjects with Spock
View ShiroAwareSpecification.groovy
class ShiroAwareSpecification extends Specification {
@Shared Subject subject
@Shared ThreadState threadState
void setupSpec() {
subject = Mock(Subject)
threadState = new SubjectThreadState(subject)
antony / gist:5907972
Created Jul 2, 2013
Angular Select Box DSL Extension for retreiving Options.
View gist:5907972
angular.scenario.dsl('selectBox', function() {
var chain = {};
chain.option = function(value) {
return this.addFutureAction("select '" + + "' option '" + value + "'", function($window, $document, done) {
var select = $document.elements('select[name="$1"]',;
var option = select.find('option[value="' + value + '"]');
if (option.length) {
} else {
antony / TestShard.groovy
Created Jul 4, 2013
Parallelise your Grails functional tests! Put this in your scripts dir.
View TestShard.groovy
import org.codehaus.groovy.grails.test.GrailsTestTypeResult
import org.codehaus.groovy.grails.test.event.GrailsTestEventPublisher
import org.codehaus.groovy.grails.test.GrailsTestTargetPattern
includeTargets << grailsScript("_GrailsClean")
includeTargets << grailsScript("_GrailsTest")
// grails t-s shard=1 shards=4
antony / stripe-checkout.js
Last active Jan 4, 2016
Faking out the Stripe CheckoutJS for Functional Tests. A simple drop-in replacement for for your functional test environment.
View stripe-checkout.js
var handler,
StripeHandler = new Klass({
initialize: function(token) {
this._callback = token;
open: function(attrs) {
var _self = this,
button = $('<button id="dummy-stripe">').html(attrs.description),
overlay = $('<div>', {id: 'dummy-stripe-overlay', style: "position: absolute; width: 20%; height: 40%; background-color: #fff; top: 30%; left: 40%; border: 4px solid #000; display: block; margin: auto auto;"}).html(button);