Skip to content

Instantly share code, notes, and snippets.

💭
Let's design a world that's thoughtful, considered and aesthetically pleasing.

Gifford Nowland gnowland

💭
Let's design a world that's thoughtful, considered and aesthetically pleasing.
Block or report user

Report or block gnowland

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:45c3e1c136ee14659059e4fc9fd816d7
Verifying my Blockstack ID is secured with the address 1Biwu72jJTKhuaraFbBR9P39ZuWAEq8zR1 https://explorer.blockstack.org/address/1Biwu72jJTKhuaraFbBR9P39ZuWAEq8zR1
@gnowland
gnowland / favorite-wp-plugins.md
Last active Oct 23, 2018
My Favorite WordPress Plugins
View favorite-wp-plugins.md

Favorite WordPress Plugins

This is a list of my favorite (read: necessary) WordPress plugins. I am generally plugin-averse, but certain situations arise where you just can't do without, or to do so would mean reinventing the wheel. For those cases, these plugins I've personally vetted to ensure that their code is performant and robust.

Images

  • Imsanity - Resizes images on upload to a more reasonable size.
  • EWWW - Image compression/optimization
@gnowland
gnowland / 01-directory-structure.md
Created Oct 2, 2018 — forked from tracker1/01-directory-structure.md
Anatomy of a JavaScript/Node project.
View 01-directory-structure.md

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used
@gnowland
gnowland / pre-commit_vault
Created Aug 10, 2017
Pre-commit to check if there are unencrypted Ansible Vault files in the working directory
View pre-commit_vault
#!/bin/sh
#
# Pre-commit hook that verifies if all files containing 'vault' in the name
# are encrypted.
# If not, commit will fail with an error message
#
# File should be .git/hooks/pre-commit and executable
FILES_PATTERN='.*vault.*\.yml$'
REQUIRED='ANSIBLE_VAULT'
@gnowland
gnowland / bg-img-cover.php
Last active Feb 8, 2017
Function (+ accompanying css) for creating "cover"-like background images with "responsive" srcset via wp_get_attachment_image
View bg-img-cover.php
<?php
function bg_img_cover($id, $size, $focus = null, $classes = null, $atts = []) {
if ( !empty($focus) ) {
$atts['style'] = "top: {$focus}; -webkit-transform: translate( -50%, -{$focus}); transform: translate( -50%, -{$focus});";
}
$img_src = wp_get_attachment_image($id, $size, false, $atts);
if( !empty($classes) ) {
$img_src = str_replace( 'class="', "class=\"{$classes} ", $img_src );
}
return $img_src;
View Magento - Add Custom Structure Blocks.md

Overview

Recently had a client that wanted to customize the layout for a category landing page so that the category's title and description would be displayed above the layered navigation and product grid — essentially creating a full-width section above the left sidebar and main content areas.

NOTE: For reference, this is based off the blog post from Collaboration133.com's Magento - Add Custom Structural Block Reference.

Custom Module (My_LayoutMods)

I created a custom module to help organize and identify that there are some custom modifications to layout templates. Not saying you have to, but it may be easier for other's (or your future self) to recognize and find what customizations were done (and hopefully why).

View Helvetica Neue stack
/**
* Helvetica Neue Normal
*/
/* Helvetica Neue Black Font Stack */
.{font-family: "HelveticaNeueBlack", "HelveticaNeue-Black", "Helvetica Neue Black", "HelveticaNeue", "Helvetica Neue", 'TeXGyreHerosBold', "Arial Black", sans-serif; font-weight:800; font-stretch:normal;}
/* Helvetica Neue Heavy Font Stack */
.{font-family: "HelveticaNeueHeavy", "HelveticaNeue-Heavy", "Helvetica Neue Heavy", "HelveticaNeue", "Helvetica Neue", 'TeXGyreHerosBold', "Arial Black", sans-serif; font-weight:700; font-stretch:normal;}
@gnowland
gnowland / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.