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
@heyfletch
heyfletch / migrate-db-pro-preserve-options.php
Last active February 9, 2023 00:20 — forked from daltonrooney/acf-migrate-db-pro.php
Prevent ACF Pro license key from being overwritten during WP Migrate DB Pro migration
<?php
/*
Based on https://gist.github.com/daltonrooney/470619cca87a6c29cb84f92d856b9ec1
and http://github.com/deliciousbrains/wp-migrate-db-pro-tweaks
*/
class ACF_WP_Migrate_DB_Pro_Tweaks {
function __construct() {
add_filter( 'wpmdb_preserved_options', array( $this, 'preserved_options' ) );
}
@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 / 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
@heyfletch
heyfletch / gppm.bash
Last active August 29, 2015 14:16
Push to WP Engine
## Push to WP Engine
function gppm() {
# check if we are in a git repository
if git rev-parse --git-dir > /dev/null 2>&1; then
# check if there any untracked files that need to be commited.
git ls-files --exclude-standard --others --error-unmatch . >/dev/null 2>&1; ec=$?
if test "$ec" = 0; then
echo
@heyfletch
heyfletch / sticky-footer.css
Last active August 29, 2015 14:11
Sticky Footer
@heyfletch
heyfletch / website-build.md
Last active August 29, 2015 14:04
Website Build Ingredients
  • matchmedia: testing whether or not a media query applies with Javascript
  • picturefill: switch image sizes / hidpi / retina (includes matchmedia?)
  • Gulp or Grunt: build system / task runner
  • NPM: node package manager
  • composer: PHP package manager
  • bower: JS package manager
  • autoprefixer: add browser prefixes
  • cssmin: minify and concatenate CSS
  • imagemin: lossless image compression
  • spritesmith: create sprites
@heyfletch
heyfletch / 0_reuse_code.js
Created June 18, 2014 19:52
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console