Skip to content

Instantly share code, notes, and snippets.

Jeremy Keith adactio

Block or report user

Report or block adactio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View note-form.php
<?php
# Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
# http://creativecommons.org/publicdomain/zero/1.0/
$labels = array(
"What’s on your mind?",
"Hey Joe, what do you know?",
"Speak your brains",
"Share what you know",
@adactio
adactio / checkbox-slider.html
Created Oct 1, 2014
Display a checkbox as a slider.
View checkbox-slider.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Checkbox</title>
<style>
body {
background-color: #fff;
color: #000;
@adactio
adactio / datalist.html
Created Jan 9, 2011
Progressive enhancement with datalist
View datalist.html
<!DOCTYPE html>
<title>Datalist test</title>
<meta charset="utf-8">
<form>
<label for="source">How did you hear about us?</label>
<datalist id="sources">
<select name="source">
<option>please choose...</option>
<option value="television">Television</option>
<option value="radio">Radio</option>
@adactio
adactio / flexboxtest.html
Created Aug 15, 2011
Content-first flexbox test
View flexboxtest.html
<!DOCTYPE html>
<html>
<head>
<title>Flexbox test</title>
<style>
@media screen and (min-width: 30em) {
body {
display: -webkit-box;
display: -moz-box;
display: -ms-box;
@adactio
adactio / monthform.html
Created Dec 13, 2011
An experiment with a progressive enhancement pattern to replace two select with a single year-month field.
View monthform.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Input test</title>
</head>
<body>
<form method="post" action="#">
@adactio
adactio / placeholderFromDatalist.js
Created Aug 12, 2012
Generate a placeholder attribute from the datalist associated with that input.
View placeholderFromDatalist.js
(function(win,doc) {
if (doc.querySelectorAll) {
var inputs = doc.querySelectorAll('input[list]'),
total = inputs.length;
for (var i=0; i<total; i++) {
var input = inputs[i],
id = input.getAttribute('list'),
list = doc.getElementById(id),
options = list.getElementsByTagName('option'),
amount = options.length,
View postToFlickr.php
<?php
# Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
# http://creativecommons.org/publicdomain/zero/1.0/
function postToFlickr($data=array()) {
$api_key = 'XXX';
$api_secret = 'XXXX';
$auth_token = 'XXXX';
View oEmbed.php
<?php
# Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
# http://creativecommons.org/publicdomain/zero/1.0/
function getEmbedCode($url="",$maxwidth=320) {
$return = '';
$providers = array(
@adactio
adactio / Look ahead pre-parser test
Last active Dec 19, 2015
I'd like to know if browsers that have a "look ahead" pre-parser for images will start downloading foo.png ...even if they support svg.
View Look ahead pre-parser test
<!DOCTYPE html>
<title>Test</title>
<object data="foo.svg" type="image/svg+xml">
<img src="foo.png">
</object>
@adactio
adactio / urtext.html
Last active May 7, 2016
December 3rd, 1990: The earliest known HTML document: http://www.w3.org/2012/08/history-of-the-web/origins.htm
View urtext.html
<h1>Standardisation</h1>
There was not a lot of discussion of this at <a href=Introduction.html>ECHT90</a>, but there seem to be two leads:
<ol>
<li><a href=People.html#newcombe>Steve newcombe's</a> and Goldfarber's "Hytime" committee
looking into SGML, and
<li>An ISO working group known as MHEG, "Multimedia/HyperText Expert Group".
led by one Francis Kretz (Thompsa SA? Rennes?).
</lo>
You can’t perform that action at this time.