Skip to content

Instantly share code, notes, and snippets.

View emarchak's full-sized avatar
🚲

Erin Marchak emarchak

🚲
View GitHub Profile
[user]
name = emarchak
email =
[core]
excludesfile = /Users/emarchak/.gitignore_global
commitGraph = true
[alias]
trash = "!git add -A && git commit -m trash && git reset --hard HEAD^"
killall = "!git branch | grep -v 'master' | xargs git branch -D"
reset-branch = "!git reset --soft HEAD~$(git rev-list --count HEAD ^origin/master)"
@emarchak
emarchak / peer_review.md
Last active March 24, 2021 14:14
Peer review: What to ask yourself

Peer Review

What not to look for

  • 🙅‍♀️ Code formatting
    • Does it use the correct indentation method?
  • 🙅‍♀️ Code style
    • Does it respect our style guidelines?
  • 🙅‍♀️ Name formatting
    • Does it use camelcase vs underscore vs ...?
  • 🙅‍♀️ Test coverage
    • Do the tests cover the majority of the code written?
@emarchak
emarchak / accessible-pager.html
Last active July 15, 2016 22:00
Accessible Pager
<nav role="navigation" aria-labelledby="pagination-heading">
<h4 id="pagination-heading" class="visually-hidden">Pagination</h4>
<ul>
<li>
<a href="?page=0" rel="first">
First<span class="visually-hidden"> page</span>
</a>
</li>
<li>
<a href="?page=1" rel="prev">
@emarchak
emarchak / rename.sh
Created October 27, 2015 15:59
rename.sh
#!/bin/bash
# USAGE
# Run this script as given.
#
# $ bash rename.sh [ relative/path/to/csvfile.csv ]
# Set from args
CSV="$1"
@emarchak
emarchak / gist:20decb6b961177f73e3a
Last active August 29, 2015 13:57
Jenkins BDD CI Discussion

Why

A strong benefit of having a Jenkins server is to allow the team to test how the application behaves, and understand regressions before they are released to production. This is done through the Jenkins server running Behat tests, which are behaviour tests written alongside the codebase. They are able to be run in browserstack, so we can simulate multiple advisors running through the system at any given time.

Using Jenkins and automated testing also allows us to practice Behaviour Driven Development (BDD), which is an agile development methodology that is a derivation of Test Driven Development. Myplanet uses BDD in the majority of it's projects, as it improves the quality of code while also helping us communicate the business value of a story.

Behat: Behaviour Driven Development

BDD improves upon the quality assurance practices of Test Driven Development by incorporating the business value into the tests. The team is required to understand why we're implementing functionality before we define

@emarchak
emarchak / gist:8568574
Last active January 4, 2016 04:29
Theme updates
<?php
function g*********d_header_update_7001(&$sandbox){
$theme_settings = variable_get('theme_eli_settings', array());
$theme_settings['alpha_region_top_nav_zone'] = 'menu';
variable_set('theme_eli_settings', $theme_settings);
}
@emarchak
emarchak / gist:7324687
Created November 5, 2013 19:26
Script to inform when to wake up Greenday.
<?php
date_default_timezone_set('America/New_York');
$current = new DateTime('NOW');
$september = strtotime('1 October ' . $current->format('Y'));
if ($current->format('U') > $september) {
print 'Wake up, Greenday.';
}
@emarchak
emarchak / Whose Hook is it Anyway.md
Last active December 19, 2015 17:28 — forked from mparker17/Whose Hook is it Anyway.md
A comedic look at D8

Whose Hook is it Anyway?

A comedic look into Drupal 8

Presented at DrupalCamp Toronto 2013 (2013-07-13). By @mparker17 and @emarchak

Dependency injection in D8

What is dependency injection?

@emarchak
emarchak / README.MD
Created May 30, 2012 13:59
ARIA Modal Dialog Markup with jQuery.UI's Dialog

I had a really good discussion with Derek Featherstone about accessible modal dialogs. He suggested going with jQuery UI's Dialog, but with the following steps:

  1. Inject the content right beside the activating button, this allows keyboard users to quickly get inside the modal.

  2. Make sure the activating item is an anchor tag, and targets the id of the modal div, so the focus is placed on it.

  3. Give the modal div a tabindex="-1" so that it can be focused via the link, but not accidentally tabbed into.

  4. Give modal div an ARIA tag of aria-labelledby="ID", where ID is the id of the header tag contained on the modal div.

@emarchak
emarchak / dabblet.css
Created December 16, 2011 08:55
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;