Skip to content

Instantly share code, notes, and snippets.

@matbrady
matbrady / input.scss
Created December 7, 2022 18:40
Generated by SassMeister.com.
// base
:root {
--black: black;
--light-gray: #eee;
--white: white;
--navy: navy;
--green: green;
}
@matbrady
matbrady / input.scss
Created August 9, 2022 17:58
Generated by SassMeister.com.
$grid-columns: 1;
$layoutBreakPoints: (
"med-small" : 580px,
);
@each $name, $width in $layoutBreakPoints {
.u-col {
@for $col from 1 through $grid-columns {
&-test {
background: red ;
@matbrady
matbrady / wp-get-taxonomy-hierarchy.php
Created May 11, 2020 16:07 — forked from daggerhart/wp-get-taxonomy-hierarchy.php
WordPress function to get a complete taxonomy hierarchy of terms in PHP
<?php
/**
* Recursively get taxonomy and its children
*
* @param string $taxonomy
* @param int $parent - parent term id
* @return array
*/
function get_taxonomy_hierarchy( $taxonomy, $parent = 0 ) {
@matbrady
matbrady / README.md
Last active April 1, 2020 17:01
Get Primary Taxonomy Term set by Yoast SEO

This have been modified to gracefully fail when used on Post types that do not support the described taxonomy.

@matbrady
matbrady / s3_logging.md
Last active January 21, 2020 18:20
Enable S3 Logging

Enable S3 Logging with AWS CLI

These captures the details provide by the aws s3api put-bucket-logging help log and documented here https://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-logging.html

Grant S3 permission

aws s3api put-bucket-acl --bucket $BUCKET --profile $PROFILE --grant-write URI=http://acs.amazonaws.com/groups/s3/LogDelivery --grant-read-acp URI=http://acs.amazonaws.com/groups/s3/LogDelivery
@matbrady
matbrady / Remove all git tags
Created September 17, 2019 14:09 — forked from okunishinishi/Remove all git tags
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
@matbrady
matbrady / init.lua
Created December 11, 2018 13:36
Hammerspoon Config
-- Use Cmd+\ to show 1Password everywhere except Visual Studio Code and Atom
function activate_1password()
local client = hs.application.frontmostApplication()
local log = hs.logger.new('mymodule','debug')
log.i(client:title())
if client:title() == 'Code' then
hs.eventtap.keyStroke({"cmd"}, "f10")
elseif client:title() == 'Atom' then
hs.eventtap.keyStroke({"cmd"}, "f11")
else
{
"exclude": [
".git/**",
"node_modules/**",
"bower_components/**"
],
"always-semicolon": true,
"color-case": "upper",
"block-indent": " ",
"color-shorthand": false,
@matbrady
matbrady / README.md
Created April 12, 2018 14:43
WPEngine
@matbrady
matbrady / README.md
Last active April 11, 2018 12:09
WPEngine Bedrock Deploy Script with Sage 9 build

This also requires disabling webpack asset cacheBusting in the production build