Skip to content

Instantly share code, notes, and snippets.


Chris Ashton ChrisBAshton

View GitHub Profile
View .babelrc
"presets": [
"useBuiltIns": "usage",
"targets": {
"chrome": "58",
"ie": "11"
View do-you-agree.html
Important: We can only hold details of one trip at a time.
<input type="checkbox" /> Tick to confirm you have read this. *
ChrisBAshton / aria-keyshortcuts.html
Last active Jun 21, 2018
Keyboard accessibility gists
View aria-keyshortcuts.html
<div class="a11y-help">
Press opt + / to open this menu
<div aria-label="Navigation Assistant" aria-keyshortcuts="Alt+/" role="menubar">
<a class="screen-reader-shortcut" tabindex="1" href="#main-content">
Skip to main content
ChrisBAshton / amp-embed.html
Last active Feb 4, 2018
Documenting how the wrapper API works
View amp-embed.html
<amp-iframe src="" width="640" height="360">
<!-- some other AMP elements here -->
ChrisBAshton / node-security.js
Last active Oct 2, 2016
Security in JavaScript
View node-security.js
var customRequest;
(function () {
function CustomRequestModule () {
function isSafeUrl (url) {
return url === '';
function getAccessToken () {
return 'my top secret access token';
ChrisBAshton /
Created Apr 11, 2016
My personal highlights from the new ES6 standard

Amazing levels of awesomeness

These are the features I've wished JavaScript always had, and can't wait to start using.


class Shape {
    constructor (id, x, y) { = id
        this.move(x, y)
ChrisBAshton /
Last active Dec 8, 2015
Cucumber Recipes Cherry-picked

Advanced Cucumber Techniques

The following tips and tricks have been cherry-picked from 'Cucumber Recipes', by Dees, Wynne and Hellesøy. ~ Chris Ashton

Native Cucumber magic

These things are built into Cucumber, and you may not even know it.

Define steps as regular ruby methods

Given /^I am on a page for (.+) seconds$/, :visit_the_page
View intelligent-text-overflow.css
.alignleft {
float: left;
.longtext {
@text (length < 300) {
overflow: hidden;
View css-dom-position.css
<div class="results">
<div class="results_top">
<div class="results_bottom">
<div class="share"></div>
ChrisBAshton / module_base.js
Last active Aug 29, 2015
Best base for a JavaScript library
View module_base.js
// shamelessly taken from Imager -
// develop your JavaScript library to support RequireJS/CommonJS/vanilla JavaScript
;(function (window, document) {
'use strict';
var Imager = function () {