Skip to content

Instantly share code, notes, and snippets.

View jameshiggins's full-sized avatar
😍

James Higgins jameshiggins

😍
View GitHub Profile
@jameshiggins
jameshiggins / docs
Created March 27, 2023 01:26
Wpengine git rempote docs
git remote add production git@git.wpengine.com:prodenvname.git
git remote add staging git@git.wpengine.com:stageenvname.git
git remote add development git@git.wpengine.com:evenvname.git
In the above commands be sure to replace prodenvname, stageenvname, and devenvname with the unique User Portal names of each environment.
You may also rename the “production,” “staging,” and “development” remotes names, if you prefer. We suggest naming them according to their role in your Site to avoid any confusion down the road.
@jameshiggins
jameshiggins / .inputrc
Created September 4, 2017 22:42
secret up down arrow command search
"\e[A": history-search-backward # arrow up
"\e[B": history-search-forward # arrow down
@jameshiggins
jameshiggins / .vimrc
Created August 19, 2017 21:53
VIM settings
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
. ~/.aliases
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@jameshiggins
jameshiggins / .aliases
Last active August 19, 2017 21:50
git aliases
#git aliases
alias gaa="git add ."
alias gs='git status'
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias ga='git add'
alias gac='git commit -am'
alias gc='git commit -m'
alias gcl='git config --list'
alias gcm='git checkout master'
alias gco='git checkout'
@jameshiggins
jameshiggins / randgroup sitebuilder
Created August 1, 2017 21:10
randgroup create new wp site
ee site create <domain> -wp
@jameshiggins
jameshiggins / gist:7b75287c47cb296f985287d291df4270
Created February 11, 2017 23:11
Set magneto 1.9x to allow negative stock and not reset to out of stock
UPDATE `core_config_data` SET `value` = '-9999' WHERE `path` = 'cataloginventory/item_options/min_qty'
@jameshiggins
jameshiggins / gist:caf3eebd48a9b2ba081794dec6eecad9
Created December 12, 2016 23:52
Download spreadsheet from Google Sheets into csv using curl
curl -o tov_stock.csv "https://docs.google.com/spreadsheets/d/17Owl5FqUOCAUnBA1JeYPTqEo8Ma7daBm3LAbwno_i3I/pub?output=csv"
git tag | grep pantheon_live_ | sort -k1.15n | tail -1
git reset --hard pantheon_live_{result from above}
@jameshiggins
jameshiggins / gist:ae402877c107ec5f87a237332e92b5dd
Last active November 29, 2016 23:48
Select Then Delete WooCommerce orphaned products
ALWAYS BACKUP YOUR DATABASES BEFORE THIS OPERATION
SELECT * FROM `wp_posts` o
LEFT OUTER JOIN `wp_posts` r
ON o.post_parent = r.ID
WHERE r.id IS null AND o.post_type = 'product_variation'
DELETE o FROM `wp_posts` o
LEFT OUTER JOIN `wp_posts` r