This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
class MagicPage { | |
constructor () { | |
var contents = Object.keys(this.getContent()) | |
contents.map((key) => { | |
this[key] = this.getContent()[key] | |
}) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ShiroAwareSpecification extends Specification { | |
@Shared Subject subject | |
@Shared ThreadState threadState | |
void setupSpec() { | |
subject = Mock(Subject) | |
threadState = new SubjectThreadState(subject) | |
threadState.bind() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let spec = macro { | |
rule { $name:lit { $body ... } } => { | |
describe($name, function () { | |
$body ... | |
}); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pm.renderer.handlebars | |
import com.github.jknack.handlebars.Handlebars | |
import com.github.jknack.handlebars.Options | |
import com.github.jknack.handlebars.Template | |
import energizedwork.support.HandlebarsSpecification | |
import ratpack.handlebars.NamedHelper | |
import spock.lang.Ignore | |
class ExampleTemplateRenderingHelperSpec extends HandlebarsSpecification<TemplateRenderingHelper, String> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// We use 'to:' on the modal trigger to force a refresh of the page cache once the modal has been inserted. | |
// Angular Bootstrap modals are actually created in the DOM once they are triggered, so our initial page parse doesn't grab them. | |
// If we don't do this, you will end up with a lot of nulls since Geb 0.11. | |
class ExamplePage extends Page { | |
static content = { | |
modalTrigger(to: ExamplePage) { $('.show-modal') } | |
modal { $('.my-modal').module(ModalDialogModule) } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package extensions | |
trait AngularJsAware { | |
boolean isAngularReady() { | |
js.exec('window.MYAPP.waitForAngular();'); | |
waitFor { | |
js.MYAPP.APP_READY == true | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
You need to install the 'anything-goes' plugin and enable it, first: | |
https://wiki.jenkins-ci.org/pages/viewpage.action?pageId=60915753 | |
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 /> | |
<script> | |
!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,g.call(this,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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am antony on github. | |
* I am aiten (https://keybase.io/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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
$('body').append(overlay); |