Skip to content

Instantly share code, notes, and snippets.

View davatron5000's full-sized avatar
🚀
Making Luro

Dave Rupert davatron5000

🚀
Making Luro
View GitHub Profile

Happy Global Accessibility Awareness Day!

Today, May 9th, is Global Accessibility Awareness Day (#GAAD) a whole day devoted to learning about web and mobile accessibility. I encourage you to take some of your time today to learn a bit more about accessibility.

Accessibility is a subset of UX that aims to makes websites usable by the most people possible, including those with disabilities. For lots of us who work on the web, accessibility is generalized as "blind people", but it's more than just screen readers and covers a wide range of users with visual, auditory, motor, and cognitive disabilities. Today is about learning how to craft better, more usable websites for people with various circumstances and situations in life.

Ways you can celebrate #GAAD

Here's a few challenges that you and your coworkers can try today:

  • Unplug your mouse f
@davatron5000
davatron5000 / w3.css
Created August 28, 2013 15:36
A user stylesheet to improve the readability of w3.org. Screenshot: http://cl.ly/image/2K1D3A040B3R
html,
body {
font-size: 100%!important;
padding: 0;
background: #fff;
}
#banner,
#menu,
#main {
@davatron5000
davatron5000 / Sublime Text Setup.md
Last active April 15, 2023 15:39
A new user's guide to SublimeText 2. Estimated reading time: 2 mins. Estimated workthrough time: 12 minutes.

Make it useful

  • Install Package Control. For SublimeText 2, paste the following in Terminal:
import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')

From here on out, use Package Control to install everything. +Shift+P, then type Install to get a list of installable packages you can 'livesearch through. After installing plugins, they should be running.

<?php
/**
* Plugin Name: Timejump
* Plugin URI: http://davatron5000.github.io/TimeJump
* Description: Deep linking for podcasts
* Version: 1.0
* Author: Dave Rupert
* Author URI: http://daverupert.com
* License: MIT/GPL2
*/
var tds = document.querySelectorAll('td');
for(i=0;i<tds.length;i++) {
var td = tds[i];
var txt = td.textContent.trim();
if(txt == 'Yes') {
td.style.backgroundColor = 'rgba(0,255,0,0.1)';
} else if(txt == 'No' ){
td.style.backgroundColor = 'rgba(255,0,0,0.1)';
}
}
@davatron5000
davatron5000 / civil-hack-app-ideas.md
Created June 26, 2014 15:24
Civil hack app ideas

Some civic hack app ideas that I've been mulling around.

Map of child obesity by school district

In order to bring about continued awareness of child obesity and to bring school districts greater accountability about what they're doing to combat the epidemic, a map of each school district color coded by avg-BMI.

Fat-shaming school districts, basically.

Popular Vote App: Representative vs. Constituents

@davatron5000
davatron5000 / critical-mishaps.md
Created July 31, 2014 15:52
Critical Mishaps

Things not being picked up by my critical CSS task that I have to manually update.

  • h1 - excusable, being used on another page
  • h2 - media-queries? - would need to confirm this.
  • .archive-list - maybe because only the top of the module is in-view, not the whole module?
  • @font-face included - slows the site down
  • pre - codeblocks on posts have long, unbreaking strings. This was causing first layout paint to be 1600px wide on mobile.
struct もじれつ: Printable {
let description: String
init(string: String) {
var mutableString = NSMutableString(string: string) as CFMutableString
if CFStringTransform(mutableString, nil, kCFStringTransformLatinHiragana, 0) == 1 {
self.description = mutableString as NSString
} else {
self.description = string
}
@davatron5000
davatron5000 / gulp-svgstore.js
Last active May 13, 2019 05:48
Gulpin' SVGz
var cheerio = require('gulp-cheerio');
var svgmin = require('gulp-svgmin');
var svgstore = require('gulp-svgstore');
gulp.task('svgstore', function () {
return gulp
.src('assets/icons/*.svg')
.pipe(svgmin())
.pipe(svgstore({ fileName: 'icons.svg', prefix: 'icon-' }))
.pipe(cheerio({
@davatron5000
davatron5000 / gulpfile.js
Last active August 29, 2015 14:13
gulp.src ➡️ icons.json
// I have a list SVG icons that I'm using svg-store on, but I'd also like to
// just throw out some JSON so I could loop through icons for my styleguide.
gulp.task('list-icons', function () {
gulp.src('assets/icons/*.svg')
// write list of matched filenames to icons.json
});