Skip to content

Instantly share code, notes, and snippets.

View ahaywood's full-sized avatar

Amy Haywood Dutton ahaywood

View GitHub Profile
@ahaywood
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 - https://lightrun.com/answers/pngwn-mdsvex-vs-code-syntax-highlighting-file-type-icon\\n \\\"files.associations\\\": { \\\"*.mdx\\\": \\\"markdown\\\", \\\"*.svx\\\": \\\"markdown\\\" },\\n // Very important: Install this plugin: https://github.com/be5invis/vscode-custom-css\\n // you'll need to change this to an absolute path on your computer\\n \\\"vscode_custom_css.imports\\\": [\\n
@ahaywood
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
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($);",
"\t$1.init();",
"});",
"\n",
"function $2($) {",
@ahaywood
ahaywood / README.md
Last active June 13, 2022 12:54
svgo Config File
View README.md

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
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 https://hyper.is#cfg 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
ahaywood / .gitignore
Created June 1, 2020 20:18
.gitignore template (generated by Create React App)
View .gitignore
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
View pull_request_template.md

Clubhouse: #ADD LINK TO CLUBHOUSE STORY

Feature description

Clearly and concisely describe the feature.

Analysis and Design

Analyze and attach design documentation.

@ahaywood
ahaywood / functions.php
Created March 5, 2019 03:31
WP - Remove Gutenberg Editor
View functions.php
/**
* REMOVE GUTENBERG EDITOR
* Reference: https://kinsta.com/blog/disable-gutenberg-wordpress-editor/
*/
add_filter('use_block_editor_for_post', '__return_false');
@ahaywood
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; ?>">
</a>
<?php } else if ($video) { // video only ?>
@ahaywood
ahaywood / README.md
Last active November 7, 2018 21:18
JS: Scroll to Top
View README.md

Requirements

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: