Skip to content

Instantly share code, notes, and snippets.

@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) {
@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 / 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 / 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>
# 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 / peepcode.rb
Created November 1, 2012 17:25 — forked from gertig/peepcode.rb
A script to download all Peepcode screencasts with ruby
#!/usr/bin/env ruby
require 'mechanize'
@username = USERNAME
@password = PASSWORD
@download_path = DOWNLOAD_PATH
unless File.directory? @download_path
puts "@{download_path} doesn't exist!"
@tlrobinson
tlrobinson / LICENSE.txt
Created October 4, 2011 14:04 — forked from 140bytes/LICENSE.txt
Simple JavaScript REPL for the browser.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Tom Robinson <http://tlrobinson.net/>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@tlrobinson
tlrobinson / LICENSE.txt
Created October 3, 2011 16:14 — forked from 140bytes/LICENSE.txt
Prefix notation calculator compiler
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Tom Robinson <http://tlrobinson.net/>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@tlrobinson
tlrobinson / LICENSE.txt
Created October 3, 2011 16:14 — forked from 140bytes/LICENSE.txt
Prefix notation calculator interpreter
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Tom Robinson <http://tlrobinson.net/>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@tlrobinson
tlrobinson / LICENSE.txt
Created October 3, 2011 16:13 — forked from 140bytes/LICENSE.txt
Prefix notation calculator parser
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Tom Robinson <http://tlrobinson.net/>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE