Skip to content

Instantly share code, notes, and snippets.

View dotherightthing's full-sized avatar

Dan Smith dotherightthing

  • Do The Right Thing
  • Wellington, New Zealand
View GitHub Profile
@dotherightthing
dotherightthing / enquirejs.md
Last active August 15, 2019 06:26
[Enquire JS] #javascript

Enquire JS

Snippet / Proof of Concept.

@dotherightthing
dotherightthing / read-more-aria.md
Last active August 15, 2019 06:23
[Read more with aria-describedby] #aria #accessibility

Read more with aria-describedby

A test for adding context to a generic Read more link, by adding ARIA.

@dotherightthing
dotherightthing / modular-fed-development.md
Last active August 15, 2019 05:59
[Modular Front-end Development]

Modular Front-end Development

Created: 07.08.2014 (work discussion)

Modular = "composed of software or hardware modules that can be altered or replaced without affecting the remainder of the system."

Benefits

  • No more code soup: Smaller blocks of code to understand, test and document - 'What can/can't/could this thing do?'
  • Quality control: Not just 'It seems to work but I'm not sure why'
@dotherightthing
dotherightthing / match-width.md
Last active August 15, 2019 06:21
[Match width] #scss

Match width

This generated a lot of CSS, so in the end i went with a JavaScript solution.

@dotherightthing
dotherightthing / drupal-reload.md
Last active August 15, 2019 06:18
[Reload page by stripping page from URL] #drupal #javascript

Reload page by stripping page from URL

From a Drupal JS app.

@dotherightthing
dotherightthing / kss-retrospective.md
Last active August 15, 2019 06:02
[KSS retrospective] #styleguides

KSS retrospective

Created: 2014.05 (email)

I've been using KSS for the past two or three years and got into them for the same reason as you did, to make sense of a large code base and prevent duplication where lots of developers were involved. In my case I didn't start my first styleguide until the developers had made a mess, but that's another story ;)

The system is not perfect:


@dotherightthing
dotherightthing / console-error-alert.md
Last active September 24, 2021 14:28
[Show a console error in an alert box] #javascript
@dotherightthing
dotherightthing / vagrant-and-puppet.md
Last active August 15, 2019 06:04
[Vagrant & Puppet] #virtualisation

Vagrant & Puppet

https://docs.vagrantup.com/v2/

Introduction

My front end development environments are becoming very dependent on the software installed on my machine (Node/NPM, Grunt, Yeoman, Bower, Ruby Gems etc). When another developer picks up one of my projects they often have problems with software versions so that the build system cannot be run and they have to spend hours troubleshooting their system, often requiring me to hold their hand which kind of defeats the purpose of handing the work off to them in the first place.

Similarly our back end development environments are becoming increasingly complex, with software like Rails, Node/NPM, Composer, different versions of PHP, etc.

@dotherightthing
dotherightthing / bump-version-strings.md
Last active August 15, 2019 06:12
[Bump version strings before tagged commit] #gulp

Bump version strings before tagged commit

Proof of concept (buggy).

@dotherightthing
dotherightthing / gulpfile-cli-param.md
Last active August 15, 2019 06:17
[Passing command-line parameter to a gulpfile] #gulp

Passing command-line parameter to a gulpfile