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
.tags {
&__tag {
&:not(:last-child):not(:nth-last-child(2)) {
&:after {
content: ", ";
}
}
&:nth-last-child(2) {
&:after {
@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;
@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 / 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
/**
* 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 / 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",

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 / 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');
@neutraltone
neutraltone / .muttrc
Created September 21, 2017 12:13
Mutt Gmail Configuration
# Me
set from = "[email protected]"
set realname = "NAME"
# My credentials
# For 2FA issue and application token from:
# https://security.google.com/settings/security/apppasswords
set smtp_url = "smtp://[email protected]@smtp.gmail.com:587/"
set smtp_pass = "password"
@neutraltone
neutraltone / https-localhost.sh
Created November 2, 2017 08:50
A set of really simple commands to enable https over localhost for Mac
cd; mkdir .ssl
openssl req -newkey rsa:2048 -x509 -nodes -keyout .ssl/localhost.key -new -out .ssl/localhost.crt -subj /CN=localhost -reqexts SAN -extensions SAN -config <(cat /System/Library/OpenSSL/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:localhost')) -sha256 -days 3650
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain .ssl/localhost.crt