Skip to content

Instantly share code, notes, and snippets.

View justinhough's full-sized avatar
📙
Writing, drinking coffee and debugging code that I probably wrote.

Justin Hough justinhough

📙
Writing, drinking coffee and debugging code that I probably wrote.
View GitHub Profile
@justinhough
justinhough / input.css
Last active January 19, 2023 21:52
Generated by SassMeister.com.
// ----
// Compass (v1.0.3)
// ----
$textSizes:(
-3:(
font-size: 10px,
line-height: 14px
),
-2:(
@justinhough
justinhough / scrollLock.js
Created January 28, 2022 20:53
Scroll Lock
// Borrowed from https://markus.oberlehner.net/blog/simple-solution-to-prevent-body-scrolling-on-ios/
// Tweaks made to html element for mobile device cases.
const body = document.querySelector('body');
const html = document.querySelector('html');
let scrollPosition = 0;
function enableScrollLock() {
scrollPosition = window.pageYOffset;
@justinhough
justinhough / acf-save-load.php
Created November 13, 2019 06:49
WP Advanced Custom Fields - Save and Load via JSON
<?php
/**
* ACF Custom Fields - Save and Load
*
* When ACF fields are added or updated this will save the output to JSON
* where they can be version controlled and loaded on Production sites.
* For best usage the production database should not contain any ACF
* in the database.
*
* @package
@justinhough
justinhough / drupal-docksal-blt-setup.md
Created May 10, 2019 16:57
Setup Drupal with Docksal and Acquia BLT

Setup Drupal with Dockal and Acquia BLT

Disclaimer: After doing some research and digging into issues with the initial setup for Docksal and BLT I have created this walkthrough about to get a Drupal project setup

  1. Create your project by running the following command below. If you run into any errors, such as, Fatal error: Allowed memory size of 1610612736 bytes exhausted then you should proceed to Overriding PHP web settings before proceeding to step 2.

fin run-cli composer create-project --no-interaction acquia/blt-project project-name

cd project-name

@justinhough
justinhough / seo-standard-header.html
Created April 7, 2018 19:16
SEO Standard Header
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="index, follow">
<link rel="canonical" href="___PAGE__CANONICAL___" />
<title>___PAGE_TITLE___ | ___SITE_NAME___</title>
@justinhough
justinhough / .gitignore
Created January 7, 2018 10:00
Scrivener Project Ignore for Git
### Scrivener ###
*/Files/binder.autosave
*/Files/binder.backup
*/Files/search.indexes
*/Files/user.lock
*/Files/Docs/docs.checksum
*/QuickLook/
*/Settings/ui.plist
@justinhough
justinhough / gist:4e58fdd928b47373db35a0fe906f1b72
Created October 29, 2017 04:21
Fix issue with valet constantly asking for password in CLI
sudo chown -R $(whoami) ~/.valet
@justinhough
justinhough / classes.txt
Last active October 27, 2017 22:54
Add classes to markdown images
![Alt text](path_to_image.png "Title text"){: .class-name }
@justinhough
justinhough / shopify-tags.js
Created May 11, 2017 05:17
Shopify tags rewritten from groups in the tags
const tags = {};
// const initialTags = "color_brown color_black type_dress-shoes type_shoes";
{% if collection.all_tags.size > 0 %}
const initialTags = {{ collection.all_tags | split: ' ' }};
{% endif %}
// console.log(array);
const splitTags = initialTags.split(" ");
@justinhough
justinhough / base.html
Created July 18, 2016 21:01
Clean and Optimized HTML page
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Page Title</title>
<!-- Description of the page (limit to 150 characters) -->