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
<?php
/*
Plugin Name: FD WP Migrate DB Pro Tweaks
Plugin URI: https://gist.github.com/heyfletch/7c563c418cc23b224af161eb5baea408
Description: Migration tweaks when running WP Migrate DB Pro
Author: Delicious Brains, Fletcher Digital
Version: 0.2.1
Author URI: https://github.com/deliciousbrains/wp-migrate-db-pro-tweaks
*/
@heyfletch
heyfletch / gulpfile.js
Last active June 10, 2016 04:10 — forked from plasticbrain/gulpfile.js
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:
@heyfletch
heyfletch / better-helvetica.css
Created May 20, 2016 23:56 — forked from don1138/better-helvetica.css
CSS Better Helvetica Font Stack
body {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
}
@heyfletch
heyfletch / chop-down-amazon.css
Created February 22, 2016 17:29
Chop Down Amazon
/* Stylish Chrome Extension:
* https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe
*/
#ad,
#promotions_feature_div,
#sponsored-products-dp_feature_div,
#dp-ads-middle_feature_div,
#detail-ilm_div,
#heroQuickPromo_feature_div {
@heyfletch
heyfletch / highlight.html
Created August 29, 2013 19:55
Highlight another element when clicking a certain hyperlink or element
<a class="highlight" href="#myIDorClass">AnchorText</a>
<script>
jQuery(".highlight").on("click", function(){
jQuery("#myIDorClass").css({'background':'yellow'});
});
</script>
@heyfletch
heyfletch / custom_options_layout_update.xml
Created December 14, 2012 18:18
Custom Color Options Magento Extension by Temgra
<reference name="head">
<action method="addJs"><script>temgra/colorCustomOptions.js</script></action>
<action method="addItem"><type>skin_css</type><name>css/colorCustomOptions.css</name></action>
</reference>
<reference name="content">
<remove name="product.info.addto" /><!-- optional -->
</reference>
<reference name="product.info">
<action method="setTemplate"><template>catalog/product/view-custom.phtml</template></action>
</reference>
@heyfletch
heyfletch / findit.sh
Created October 13, 2012 21:10
Bash Command / Bashrc Function to find any occurrence of a key phrase in files or filepaths
function findit() {
{ mlfind . -iname "*$1*";
grep -irl "$1" .
} | sort -u
}
export -f findit
# Returns a list of filepaths where the key phrase occurs.
# Case insensitive
# Usage:
@heyfletch
heyfletch / MageMonkeySubscribe.phtml
Created April 17, 2012 19:05
MageMonkeySubscribe.phtml with some fixes to prevent javascript errors, but does not actually subscribe customer
<?php
$check = $this->checkStatus();
$auto = (($check === 1) OR ($check === 3));
?>
<script type="text/javascript">
addSubscribeToPost = function (element)
{
if($('magemonkey-subscribe'))
{
$('magemonkey-subscribe').remove();
@heyfletch
heyfletch / gitlab-init-remote
Last active August 29, 2015 14:22
gitlab-init-remote
#!/bin/sh
# Modified from: https://coderwall.com/p/r7yh6g/create-a-new-gitlab-repo-from-the-command-line
# to use:
## Setup script locally:
# download gist (use this node helper: https://www.npmjs.com/package/download-gist)
# dg af568a27686e560de21d
# First, replace MyGitlabToken from https://gitlab.com/profile/account
# chmod +x gitlab-init-remote
#!/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=web # -- wordpress owner
WP_GROUP=www-data # -- wordpress group
WP_ROOT=/srv/www/webproguru/project/web # -- wordpress root directory