Skip to content

Instantly share code, notes, and snippets.

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

Joe Fletcher heyfletch

🏠
Working from home
View GitHub Profile
@builtbylane
builtbylane / google_conversion_iframe_hider.scss
Created February 15, 2016 01:53
Hide google_conversion_frame iframe
iframe[name='google_conversion_frame'] {
height: 0 !important;
width: 0 !important;
line-height: 0 !important;
font-size: 0 !important;
margin-top: -13px;
float: left;
}
@plasticbrain
plasticbrain / gulpfile.js
Last active February 13, 2024 14:31
gulp.js task to deploy code to remote servers
/*******************************************************************************
* Description:
*
* Gulp file to push changes to remote servers (eg: staging/production)
*
* Usage:
*
* gulp deploy --target
*
* Examples:
@chrisblackwell
chrisblackwell / wordpress-nginx.conf
Created April 22, 2015 12:02
WordPress nginx confuration
server {
listen 80 default_server;
server_name domain.tld;
access_log /srv/www/domain.tld/logs/access.log;
error_log /srv/www/domain.tld/logs/error.log;
root /srv/www/domain.tld/public;
index index.php index.html index.htm;
client_max_body_size 20M;
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro
#
WP_OWNER=changeme # <-- wordpress owner
WP_GROUP=changeme # <-- wordpress group
WP_ROOT=/home/changeme # <-- wordpress root directory
@bhubbard
bhubbard / view-all-shortcodes.php
Created March 27, 2015 18:58
All available shortcodes
<?php
/*
Plugin Name: Paulund View All Shortcodes
Plugin URI: http://www.paulund.co.uk
Description: View all the available shortcodes on your WordPress blog. This page will show you everything that is currently registered so you can use these in the text editor of WordPress
Version: 1
Author: Paul Underwood
Author URI: http://www.paulund.co.uk
http://www.paulund.co.uk/get-list-of-all-available-shortcodes
@eriteric
eriteric / movegfjstofooter.php
Last active October 13, 2021 16:55
Load gravity forms JS in footer
// GF method: http://www.gravityhelp.com/documentation/gravity-forms/extending-gravity-forms/hooks/filters/gform_init_scripts_footer/
add_filter( 'gform_init_scripts_footer', '__return_true' );
// solution to move remaining JS from https://bjornjohansen.no/load-gravity-forms-js-in-footer
add_filter( 'gform_cdata_open', 'wrap_gform_cdata_open' );
function wrap_gform_cdata_open( $content = '' ) {
$content = 'document.addEventListener( "DOMContentLoaded", function() { ';
return $content;
}
add_filter( 'gform_cdata_close', 'wrap_gform_cdata_close' );
@codesprint
codesprint / 1.js
Last active February 28, 2017 16:07
Magento: countryRegions not defined
countryRegions is not defined
@markjaquith
markjaquith / nginx.conf
Last active December 25, 2022 15:55
My WordPress Nginx setup
upstream phpfpm {
server unix:/var/run/php5-fpm.sock;
}
upstream hhvm {
server unix:/var/run/hhvm/hhvm.sock;
}
# SSL
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
@markthethomas
markthethomas / gist:6b114f5fd7d55d29eca3
Created May 31, 2014 19:28
Roots gruntfile with imagemin and autoprefixer
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: [
'Gruntfile.js',