Skip to content

Instantly share code, notes, and snippets.

# Waits for an element to be present, then returns it.
browser.waitForAndGetElementBy = (kind, value) ->
@["waitForElementBy#{kind}"](value, 5000)
.then =>
@["elementBy#{kind}"](value)
browser.init(desired)
.then ->
browser.get "http://example.com/"
.then ->
@tlrobinson
tlrobinson / head.html
Created September 9, 2013 22:03 — forked from juliangruber/head.html
requirebin sketch
<style type='text/css'> html, body { margin: 0; padding: 0; border: 0; } </style>
@tlrobinson
tlrobinson / LICENSE
Last active March 2, 2016 23:51 — forked from dfm/LICENSE
XKCD-style plots in d3
Copyright (c) 2012–2013 Daniel Foreman-Mackey
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
@tlrobinson
tlrobinson / todo.css
Last active March 16, 2016 18:25 — forked from kriskowal/todo.css
/* using css syntax highlighting for giggles */
#todos {
value <- #this.value;
}
#todos:iteration {
#done.value <- value.done;
#label.value <- value.label;
#item.classList.has('active') <- value.active;
@tlrobinson
tlrobinson / visualize-stacking-contexts.js
Last active January 7, 2022 03:14 — forked from eoinkelly/visualize-stacking-contexts.js
Some console output to help you visualise stacking contexts on a page (no jquery)
/*
Usage:
* Paste this into your dev tools console (or even better as a snippet)
* It will parse the page and find all the things that create a new stacking context
and dump some info about them to the console. It will also outline them on the page.
* This is pretty rough and probably misses heaps of bugs and edge cases.
*/
function highlight(el) {