Skip to content

Instantly share code, notes, and snippets.

View esayler's full-sized avatar

Eric Sayler esayler

View GitHub Profile
@esayler
esayler / App.elm
Created August 15, 2017 17:12
pomo-elm
module App exposing (main)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Time exposing (..)
startTime : Int
startTime =
@esayler
esayler / orcz-botw-recipe-scrape.js
Created May 21, 2017 16:19
nightmare.js script to scrape Orcz.com "Zelda: Breath of the Wild" Recipe/Item Data
var jsonfile = require('jsonfile')
var dest = 'data2.json'
jsonfile.spaces = 2
const Nightmare = require('nightmare')
const nightmare = Nightmare({ show: true })
nightmare
.goto('http://orcz.com/Breath_of_the_Wild:_Recipes')
.wait(2000)
let stream = progress({ time: 50 })
stream.on('progress', progress => {
mainWindow.setProgressBar(progress.percentage / 100.0)
})
request
.get(url)
.pipe(stream)
.pipe(fs.createWriteStream(path))
request
.get(url)
.pipe(fs.createWriteStream(path))
.on('close', callback)
function List() {
this.head = null;
this.tail = null;
this._length = 0;
};
List.prototype.push = function(data) {
var newNode = new ListNode(data);
if (this.head === null && this.tail === null) {
this.head = newNode;

Accessibility Commitments

1. Visual + Cognition

Consistent Clean Design

Use a consistent, simple, clean design to reduce cognitive load and make your site easily navigable and easy to use

  • Use lots of white space, keep design uncluttered
  • Use few fonts, black text on white background (high contrast) to make easier to read for dyslexics
@esayler
esayler / es-css-challenges.md
Last active October 16, 2016 15:28 — forked from LouisaBarrett/css-challenges-template.md
CSS Layout Challenges - 1610FE - Eric Sayler

CSS Layout Challenges - 1610FE - Eric Sayler

TODO:

  • complete Challenges 1-15
  • refactor to make solutions more responsive
  • refactor to make less use of position: absolute;

Solutions:

@esayler
esayler / leap-closure.js
Last active October 15, 2016 15:47
leap-closure.js
var Year = function(input) {
Year.prototype.isLeap = function() {
if (input % 4 === 0) {
if (input % 100 === 0) {
if (input % 400 === 0) {
return true;
} else {
return false;
var Year = require('./leap');
describe('Leap year', function() {
it('is not very common', function() {
var year = new Year(2015);
expect(year.isLeap()).toBe(false);
});
it('is introduced every 4 years to adjust about a day', function() {