Skip to content

Instantly share code, notes, and snippets.

View pattiereaves's full-sized avatar
🏠
Working from home

Pattie Reaves pattiereaves

🏠
Working from home
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Testing waterfall</title>
</head>
<body>
<div id="c" style="border: 1px solid black; display: inline-block; margin: 0; padding: 0; line-height: 0;"></div>
<script>
var container = document.getElementById('c'),
adIframe = document.createElement('iframe');
@pattiereaves
pattiereaves / Button.js
Last active August 13, 2020 17:08
React Testing Library example
import React, { useState } from 'react';
export default ({ info }) => {
const [isVisible, setIsVisible] = useState(false);
return (
<>
<button aria-controls="info" onClick={() => setIsVisible(!isVisible)}>Show info</button>
{isVisible && <p id="info" role="dialog">{info}</p>}
</>
);
@pattiereaves
pattiereaves / makeComponent.sh
Last active February 8, 2019 14:25
Add this to your shell and it will scaffold a React component.
NAME=$1
CAPITAL_NAME=$(tr '[:lower:]' '[:upper:]' <<< ${NAME:0:1})${NAME:1}
# Make directory
echo "Creating directory $NAME"
mkdir $1
# Make index,js
echo "Creating $NAME/index.js"
cat <<EOF >$NAME/index.js
{
"added_words":
[
"stylesheet",
"mixins",
"mixin",
"flexbox",
"scss",
"css",
"stylesheets",
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AlternateMouseScroll</key>
<true/>
<key>AppleAntiAliasingThreshold</key>
<integer>1</integer>
<key>AppleScrollAnimationEnabled</key>
<integer>0</integer>
@pattiereaves
pattiereaves / README.md
Last active May 7, 2018 08:15
My favorite automator scripts

Attaching automator scripts to keyboard shortcuts

Once you create an automator script, you can run them by going to the application menu and choosing services (for example, Chrome > Services > j2m). Or you can one-up your game and attach the service to a keyboard shortcut.

To do that, go to System Preferences > Keyboard > Shorcuts.

Then, in the shortcuts, go to Servies and then scroll down to Text.

You should be see the service you have created in that list and can add a keyboard shortcut to it.

@pattiereaves
pattiereaves / bio.md
Last active January 16, 2018 23:41
Pattie Reaves Bio

Title

Senior UX Developer

Description

Pattie Reaves is a senior UX Developer at Alley Interactive on the data visualizations and interactives team. She has more than 10 years of experience building websites with WordPress and Drupal. Prior to Alley, Pattie came from the world of newspapers, where she worked as an editor producing digital storytelling, managing a volunteer blog network and running audience analytics.