Skip to content

Instantly share code, notes, and snippets.

View neutraltone's full-sized avatar
🏠
Working from home

Tony Phipps neutraltone

🏠
Working from home
View GitHub Profile
@neutraltone
neutraltone / functions.php
Created June 7, 2017 08:42
Clean up WordPress `<head>`
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'rel_canonical');
remove_action('wp_head', 'feed_links');
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'feed_links_extra');
remove_action('wp_head', 'start_post_rel_link');
remove_action('wp_head', 'wp_shortlink_wp_head');
remove_action('wp_head', 'parent_post_rel_link');

Keybase proof

I hereby claim:

  • I am neutraltone on github.
  • I am neutraltone (https://keybase.io/neutraltone) on keybase.
  • I have a public key whose fingerprint is 6C03 CA59 F73F 9C34 CDFF BF79 66D7 39E4 DE44 1C2C

To claim this, I am signing this object:

@neutraltone
neutraltone / composer.json
Created November 15, 2016 10:55
A starter composer file for managing wordpress with composer.
{
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
},
{
"type": "package",
"package": {
"name": "advanced-custom-fields/advanced-custom-fields-pro",
/**
* In page anchor header offset
* ----------------------------
* Check a href for an anchor. If exists, and in document, scroll to it.
* If href argument ommited, assumes context (this) is HTML Element,
* which will be the case when invoked by jQuery after an event
*/
function scroll_if_anchor(href) {
href = typeof(href) == "string" ? href : $(this).attr("href");
@neutraltone
neutraltone / gulpfile.js
Created June 16, 2016 11:35
Gulp Sass Task
gulp.task('sassdev', function() {
gulp.src(src + '/styles/main.scss')
.pipe(sourcemaps.init())
.pipe(plumber())
.pipe(sass())
.pipe(autoprefixer({ browsers: ['> 1%', 'iOS 7'] }))
.pipe(sourcemaps.write())
.pipe(gulp.dest(dest + '/css'))
.pipe(size({
showFiles: true
@neutraltone
neutraltone / .stylelintrc
Last active October 23, 2016 18:02
Stylelint Declaration Order
"declaration-block-properties-order": [
'composes',
'display',
'position',
'top',
'right',
'bottom',
'left',
'columns',
'column-gap',
@neutraltone
neutraltone / placeholder-mixin.scss
Last active October 23, 2016 18:02
Placeholder Mixin
// placeholder styling
@mixin placeholder($color) {
::-webkit-input-placeholder {
color: $color;
}
::-moz-placeholder {
color: $color;
}
:-ms-input-placeholder {
color: $color;
.tags {
&__tag {
&:not(:last-child):not(:nth-last-child(2)) {
&:after {
content: ", ";
}
}
&:nth-last-child(2) {
&:after {
@neutraltone
neutraltone / SassMeister-input-HTML.html
Created February 16, 2016 09:16
Generated by SassMeister.com.
<div class="header header--sticky">
<div class="header__container header__container--active">
<nav>navigation</nav>
</div>
</div>
@neutraltone
neutraltone / gulpfile.js
Last active January 25, 2018 03:22
A gulp task for creating SVG sprites, loading them into your template with AJAX and styling them with CSS
/**
* Gulp Packages
* =============
* Import our gulp packages.
*/
import gulp from 'gulp';
import svgmin from 'gulp-svgmin';
import svgstore from 'gulp-svgstore';
import cheerio from 'gulp-cheerio';