Create a node server with es6 support
yarn add --dev @babel/core @babel/cli @babel/preset-env @babel/node nodemon
add this to your package.json file
version: '2' | |
services: | |
db: | |
container_name: database | |
image: mariadb # Pull mysql image from Docker Hub | |
ports: # Set up ports exposed for other containers to connect to | |
- "3306:3306" | |
volumes: | |
- ./dep/mysql:/docker-entrypoint-initdb.d |
// Prevent Multi Submit on WPCF7 forms | |
add_action( 'wp_footer', 'mycustom_wp_footer' ); | |
function mycustom_wp_footer() { | |
?> | |
<script type="text/javascript"> | |
var disableSubmit = false; | |
jQuery('input.wpcf7-submit[type="submit"]').click(function() { | |
jQuery(':input[type="submit"]').attr('value',"Sending...") |
/* | |
This can be used when we need to move to a front end that only delivers the | |
users and their allocation percentage | |
salesReps is the sample array we would get from the DB. | |
*/ | |
const salesReps = [ | |
{name: "Renee", id:"30761006", allocation: 70}, | |
{name: "Emma", id:"33620479", allocation: 10}, | |
{name: "Marian", id:"33495420", allocation: 10}, |
window.scrollTo({ | |
top: document.querySelector('.stats__chart').scrollHeight, | |
behavior: "smooth" | |
}) | |
or | |
const scrollToVideo = () => { | |
let e = document.getElementById('video') | |
e.scrollIntoView({behavior: 'smooth'}) |
Youngblood & Sunescape checkout pages. Abandoned cart issue (There is currently no way to abandon the cart on our current website (so we can't currently re-market via email to them). The billing, shipping, total amount, payment method and credit card details are all in the one shopping cart page. We are needing this to be split onto two pages so that they don't complete the actual payment credit card details until the next page. This way they have to submit their information and it will display on our backend as an abandoned cart and we have their email address to re-market too.)
Websites will not talk to Mailchimp even in ""MailChimp for WooCommerce" Plugin. Integration has been made but it does not pull across the data of what customer purchased (or any details)
Plugin already talking to mailchimp in terms of customers and seeing their purchase
I just can't see any abandoned carts to re-market to them
If you work across many computers (and even otherwise!), it's a good idea to keep a copy of your setup on the cloud, preferably in a git repository, and clone it on another machine when you need.
Thus, you should keep the .vim
directory along with your .vimrc
version-controlled.
But when you have plugins installed inside .vim/bundle
(if you use pathogen), or inside .vim/pack
(if you use Vim 8's packages), keeping a copy where you want to be able to update the plugins (individual git repositories), as well as your vim-configuration as a whole, requires you to use git submodules.
Initialize a git repository inside your .vim
directory, add everything (including the vimrc), commit and push to a GitHub/BitBucket/GitLab repository:
cd ~/.vim
{ | |
"schema": { | |
"files": "**/*.graphql" | |
} | |
} |
// Tracks what prop is changing to trigger re-render | |
// shout out to this legend | |
// https://stackoverflow.com/a/51082563/5157083 | |
// usage useTraceUpdate(props) | |
function useTraceUpdate(props) { | |
const prev = React.useRef(props) | |
React.useEffect(() => { | |
const changedProps = Object.entries(props).reduce((ps, [k, v]) => { | |
if (prev.current[k] !== v) { | |
ps[k] = [prev.current[k], v] |