Skip to content

Instantly share code, notes, and snippets.

View gazjoy's full-sized avatar
🦆

Gareth Joyce gazjoy

🦆
View GitHub Profile
@selfthinker
selfthinker / intentionally-inaccessible.md
Last active October 19, 2025 22:21
Intentionally inaccessible websites

Intentionally inaccessible websites (and apps)

People make intentionally inaccessible websites for various educational purposes: training, empathy, tests, demos, etc. This lists all such websites I am aware of. Please let me know if you know of any others to be added to this list.

website explanations by license last update
Awesome Recipes (from Deque University Demo Sites) (none) Deque (none) ?
Dream Destination (from Deque University Demo Sites) (none) Deque (none) ?
Gefälscht (from Deque University Demo Sites) (none) Deque (none) ?
router.get("/letters-contact-preference-audio", function(request, response){
let preferences = request.session.data['lettersContactPreference']
if (preferences.length && preferences.includes('audio'){
response.render("letters-contact-preference-audio")
} else {
response.redirect("/letters-contact-preference-braille")
}
@robpataki
robpataki / nunjucks-snippets.njk
Created November 15, 2018 14:27
Nunjucks snippets
{# Conditionally render inline CSS class #}
<div class="govuk-grid-row {{ 'govuk-!-margin-top-9' if not(showBackButton) else 'govuk-!-margin-top-3' }}">
@robpataki
robpataki / time-travel.js
Created September 19, 2018 12:35
Display moment style dates in the front-end
/*
Example usage:
<span class="moment" data-moment="add 12 days"></span>
*/
'use strict'
import moment from 'moment'
/* TimeTravel */
@robpataki
robpataki / how-we-do-git.md
Last active February 14, 2025 18:21
This is how we do git (rebase, feature branches, PRs)

How to / Git

Branching strategy

We use a form of Git flow to maintain a stable master branch, and work off feature branches to introduce new features and other code updates. The feature branches are tied to JIRA tickets.

To keep our git log clean and tidy we use git's rebase strategy. That means that instead of merging commits in and out of the master branch (resulting in many ugly merge commits) we always keep our own feature branch's commits on top of the existing master branch commits.

You can read more about the rebase strategy here: https://www.atlassian.com/git/tutorials/merging-vs-rebasing.

@joelanman
joelanman / routes.js
Last active June 29, 2018 09:42
how to use marked
const express = require('express')
const router = express.Router()
const marked = require('marked')
// Route index page
router.get('/', function (req, res) {
res.render('index')
})
// Add your routes here - above the module.exports line

Accessibility criteria for Modal Dialog - WIP

User story

As an Assistive Technology (AT) user, I want to be informed that a modal dialog has opened, what its purpose is, and how to action / close it.

Acceptance criteria

The modal dialog must:

@atelierbram
atelierbram / set-active-class-in-nunjucks.md
Last active January 20, 2025 10:30
Set Active Class on Nav-Menu-Item in Nunjucks

In html/about/index.html:

{% extends "layouts/layout.njk" %}

{% set base_path = "../../" %}
{% set page_title = "about" %} 

In data.json:

@daveredfern
daveredfern / Default gulp file
Last active August 29, 2015 14:23
An example gulp file to compile sass, jshint javascript and optimise images
/*!
* gulp
* $npm init
* $ npm install gulp-sass gulp-autoprefixer gulp-minify-css gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache gulp-sourcemaps del --save-dev
*/
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
@robpataki
robpataki / .profile
Last active August 2, 2018 10:30
Bash profile
export PATH="/usr/local/bin:usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/etc:/usr/local/mysql/bin:/.rbenv/bin:$PATH"
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home"
# Load SSH keys
ssh-add -K ~/.ssh/id_rsa
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi