Skip to content

Instantly share code, notes, and snippets.

View ahaywood's full-sized avatar

Amy Haywood Dutton ahaywood

View GitHub Profile
ahaywood / selfteachme
Last active August 3, 2023 15:26
VSCode Profile for Installing all of my Settings, Extensions, Snippets, Keyboard Shortcuts
View selfteachme
{"name":"selfteachme","settings":"{\"settings\":\"{\\n \\\"atomKeymap.promptV3Features\\\": true,\\n \\\"files.autoSave\\\": \\\"off\\\",\\n \\\"editor.formatOnPaste\\\": true,\\n \\\"workbench.colorTheme\\\": \\\"Cobalt2\\\",\\n \\\"editor.fontSize\\\": 14,\\n \\\"editor.lineHeight\\\": 30,\\n \\\"editor.letterSpacing\\\": 0,\\n \\\"files.trimTrailingWhitespace\\\": true,\\n \\\"editor.fontWeight\\\": \\\"400\\\",\\n \\\"editor.cursorStyle\\\": \\\"line\\\",\\n \\\"editor.cursorWidth\\\": 5,\\n \\\"editor.cursorBlinking\\\": \\\"solid\\\",\\n // this associates MDX and SVX files with the markdown language -\\n \\\"files.associations\\\": { \\\"*.mdx\\\": \\\"markdown\\\", \\\"*.svx\\\": \\\"markdown\\\" },\\n // Very important: Install this plugin:\\n // you'll need to change this to an absolute path on your computer\\n \\\"vscode_custom_css.imports\\\": [\\n
ahaywood / states.ts
Last active November 14, 2022 15:37
View states.ts
export const states = [
value: 'AK', name: 'Alaska'
value: 'AL', name: 'Alabama'
value: 'AR', name: 'Arkansas'
ahaywood / javascript.json
Last active October 11, 2021 19:43
JavaScript Snippets for VS Code
View javascript.json
"Starter JS": {
"prefix": "start_js",
"body": [
"jQuery ( function($) {",
"\tvar $1 = new $2($);",
"function $2($) {",
ahaywood /
Last active June 13, 2022 12:54
svgo Config File

This is a config file to be used with svgo's command line tool.

You can ues it with the following command:

svgo *.svg --config=/PATH-TO-FILE/svgo-config.yml
ahaywood / hyper.js
Created June 14, 2020 21:06
Hyper Configuration
View hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: "stable",
ahaywood / .gitignore
Created June 1, 2020 20:18
.gitignore template (generated by Create React App)
View .gitignore
# See for more about ignoring files.
# dependencies
# testing


Feature description

Clearly and concisely describe the feature.

Analysis and Design

Analyze and attach design documentation.

ahaywood / functions.php
Created March 5, 2019 03:31
WP - Remove Gutenberg Editor
View functions.php
* Reference:
add_filter('use_block_editor_for_post', '__return_false');
ahaywood / image-and-video.php
Created November 9, 2018 21:02
Display Image and Video
View image-and-video.php
<div class="fitvids">
<?php $video = get_field('testimonial_video');
$image = get_field('testimonial_image'); ?>
<?php if ($image && $video) { // image click to video ?>
<a href="#" class="js-video">
<img src="<?php echo $image; ?>" data-video="<?php echo $video; ?>">
<?php } else if ($video) { // video only ?>
ahaywood /
Last active November 7, 2018 21:18
JS: Scroll to Top


Make sure you're including jQuery within the project.

Quick Use

The link that you want the user to click, trigger the scroll, needs to have a class of js-scroll-to-top:

<a href="#" class="js-scroll-to-top">Back to Top</a>

At the top of your page, right after the body tag, include an empty div with an ID of top: