Skip to content

Instantly share code, notes, and snippets.

Mark Howells-Mead markhowellsmead

Block or report user

Report or block markhowellsmead

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
markhowellsmead / .babelrc
Last active Apr 23, 2019
Simple Gulp (ES6)
View .babelrc
"presets": ["@babel/preset-env"]
markhowellsmead / core-blocks.txt
Created Apr 4, 2019
WordPress Gutenberg Core Blocks
View core-blocks.txt
markhowellsmead / devruleset.xml
Last active Apr 29, 2019
Dev ruleset for PHP development on new projects (2019)
View devruleset.xml
<?xml version="1.0"?>
<ruleset name="SayHelloStandard">
<description>PSR2 with tabs instead of spaces, as used for projects by</description>
<arg name="tab-width" value="4"/>
<rule ref="PSR2">
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
markhowellsmead / _flickity.scss
Last active Jan 18, 2019
Say Hello: Carousel using Flickity, Timber and Twig, with custom cross-fade effect
View _flickity.scss
.flickity {
&--fade {
.flickity-slider {
transform: none !important;
.flickity-cell {
@include transition(all, slower);
left: 0 !important;
opacity: 0;
markhowellsmead / BRBookWidget.php
Last active Jan 16, 2019
Widget class for use with the Say Hello Roots Theme for WordPress
View BRBookWidget.php
namespace SayHello\Theme\Widget;
use SayHello\Theme\Package\ThemeOptions;
use SayHello\Theme\Vendor\LazyImage;
use Timber\Timber;
* Adds widget for user navigation.
markhowellsmead /
Created Jan 8, 2019
Setup SASS and Compass in VVV
# sass install
sass_install="$(gem list sass -i)"
if [ "$sass_install" = true ]; then
echo "sass installed"
echo "sass not installed"
gem install sass
sass_path="$(gem which sass | sed -s 's/.rb/\/deployer\/base.rb/')"
if [ "$(grep yaml $sass_path)" ]; then
markhowellsmead / phpcs.sublime-settings
Last active Mar 11, 2019
PHP CS configuration for Sublime Text 3 (e.g. ~/Library/Application Support/Sublime Text 3/Packages/User on Mac OSX)
View phpcs.sublime-settings
// Plugin settings
// Make sure that this path matches your development environment
"phpcs_executable_path": "~/.composer/vendor/bin/phpcs",
// Additional arguments
"phpcs_additional_args": {
"--standard": "~/Library/Application Support/Sublime Text 3/Packages/User/sh-ruleset.xml",
"-n": ""
markhowellsmead / mini-modernizr.html
Created Jul 4, 2018 — forked from tomblanchard/mini-modernizr.html
Mini Modernizr: I only ever use Modernizr mostly to check for JS and / or touch screen devices. This tiny piece of code will replace the classes which are on the `<html>` element `no-js` with `js` and `no-touch` with `touch`.
View mini-modernizr.html
<script>!function(a,b){"use strict";b.documentElement.className=b.documentElement.className.replace("no-js","js"),("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)&&(document.documentElement.className=document.documentElement.className.replace("no-touch","touch"))}(window,document);</script>
markhowellsmead / mark-parent-navigation-active.php Mark (highlight) post type parent as active item in Wordpress Navigation. When you visit a custom post type's single page, the parent menu item (the post type archive) isn't marked as active. This code solves it by comparing the slug of the current post type with the navigation items, and adds a class accordingly.
View mark-parent-navigation-active.php
add_action('nav_menu_css_class', function ($classes, $item) {
// Getting the current post details
$post = get_queried_object();
if (isset($post->post_type)) {
if ($post->post_type == 'post') {
$current_post_type_slug = get_permalink(get_option('page_for_posts'));
markhowellsmead /
Created Apr 29, 2018 — forked from neverything/
Install composer and wp-cli on hostings with SSH access.
View - Install composer & wp-cli


SSH into your server and stay in the home directory of the user.

Install composer using curl. Check if you have a bin directory in your user directory already, in case you do, omit the mkdir bin.

cd ~
You can’t perform that action at this time.