Skip to content

Instantly share code, notes, and snippets.

View tjbenton's full-sized avatar

Tyler Benton tjbenton

View GitHub Profile
@tjbenton
tjbenton / ready.html
Last active September 14, 2021 20:27
document.ready Promise
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="./ready.js"></script>
<script>
document.ready.then(function() {
console.log('READY!');
});
</script>
@tjbenton
tjbenton / pseudo-elements.md
Created December 17, 2015 18:26 — forked from p3t3r67x0/pseudo_elements.md
A CSS pseudo-element is used to style specified parts of an element. In some cases you can style native HTML controls with vendor specific pseudo-elements. Here you will find an list of cross browser specific pseudo-element selectors.

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {
@tjbenton
tjbenton / export-syntax.js
Created October 12, 2015 18:59 — forked from caridy/export-syntax.js
ES6 Module Syntax Table
// default exports
export default 42;
export default {};
export default [];
export default foo;
export default function () {}
export default class {}
export default function foo () {}
export default class foo {}
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Simon Madine <http://thingsinjars.com>
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

This is a general-purpose function to ask Yes/No questions in Bash, either with or without a default answer. It keeps repeating the question until it gets a valid answer.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Simon Madine <http://thingsinjars.com>
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