Skip to content

Instantly share code, notes, and snippets.

@darrenjaworski
darrenjaworski / gulpfile.js
Last active May 28, 2018 04:31
Craft cms gulpfile
var gulp = require('gulp'),
sass = require('gulp-sass'),
sourcemaps = require('gulp-sourcemaps'),
browserSync = require('browser-sync').create(),
autoprefixer = require('gulp-autoprefixer'),
minify = require('gulp-minify-css'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
rename = require('gulp-rename');
@darrenjaworski
darrenjaworski / accessible.md
Last active April 4, 2018 13:08
web accessibility - checklist

Adopted from (webaim)[https://webaim.org/intro/].

More good resources: (google accessibility)[https://developers.google.com/web/fundamentals/accessibility/], (w3)[https://www.w3.org/WAI/intro/accessibility.php]

  • every img should have alt text that describes what is in the image
  • keyboard navigation within the page, (tab and arrow keys)
  • in a form, every element has a label, and describes what appropriately the form element is
  • ensure every form element within a form can be navigated to
  • caption and/or transcripts for media (audio/video)
  • every link should make sense with the link text, avoid "submit, click here" etc
@darrenjaworski
darrenjaworski / README.md
Last active April 2, 2018 18:49
Animated scatterplot through time

This is my initial attempt to replicate a NY Times graphic on the rising debt and cost of college. This is Oklahoma centric data. Circle size is proportional to total enrollment. X axis is tuition and fee costs and the Y axis is average student debt for first time full time students.

@darrenjaworski
darrenjaworski / index.html
Last active March 16, 2018 03:56
materializecss modals
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css">
</head>
@darrenjaworski
darrenjaworski / index.html
Last active October 31, 2017 21:12
Oklahoma State Parks.
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Oklahoma State Parks</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.18.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.18.0/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@darrenjaworski
darrenjaworski / ack.js
Created April 17, 2017 22:23
Ackermann Function - JS
function ackermann(m, n) {
var ans;
if (m === 0) {
ans = n + 1;
} else if (n === 0) {
ans = ackermann(m - 1, 1);
} else {
ans = ackermann(m - 1, ackermann(m, n - 1));
}
return ans;
@darrenjaworski
darrenjaworski / index.html
Last active February 15, 2017 13:18
d3 fitextent and responsive projection
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
body {
margin: 0;
}
svg {
@darrenjaworski
darrenjaworski / index.html
Last active February 15, 2017 13:14
thenmap api - world
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.country-border {
/*fill: #d3d3d3;
stroke: #f1f1f1;*/
fill: none;
stroke: #000;
stroke-width: 1px;
@darrenjaworski
darrenjaworski / README.md
Last active February 15, 2017 13:12
Textured choropleth

These textures are a lot of fun. Here is a choropleth using a few predefined textures on some random data.