Skip to content

Instantly share code, notes, and snippets.


Constant Meiring constantm

View GitHub Profile
mrmartineau /
Last active Sep 22, 2022
Stimulus cheatsheet
View gulpfile.js
Streamlined Shopify theme development.
NOTE: depends on module gulp-shopify-theme
npm install --save-dev yargs gulp gulp-sass gulp-changed gulp-sourcemaps gulp-autoprefixer gulp-uglify gulp-concat gulp-replace gulp-plumber gulp-babel browser-sync gulp-if del gulp-add-src gulp-rename gulp-yaml gulp-shopify-theme
- https proxying via BrowserSync
thenbrent /
Created Aug 8, 2016
Brief developer's guide to the application flow during the subscription renewal process within WooCommerce Subscriptions

WoCommerce Subscriptions processes automatic renewal payments via the following flow:

  1. its scheduling system, Action Scheduler, will run every minute and find any woocommerce_scheduled_subscription_payment actions scheduled to run now or within the last minute
  2. if there are woocommerce_scheduled_subscription_payment actions scheduled for anytime before now, Action Scheduler will grab a batch of those actions and begin processing them (which just means triggering do_action( 'scheduled_subscription_payment', $subscription_id ) for any 3rd party code to handle)
  3. Subscriptions attaches two important functions as callbacks on the 'woocommerce_scheduled_subscription_payment' hook to process renewal for that subscription when it is called:
  4. WC_Subscriptions_Manager::prepare_renewal(), which is responsible for
tansongyang / cartesian-product-lodash-fp.js
Last active Feb 18, 2019
An implementation of Cartesian product using lodash/fp
View cartesian-product-lodash-fp.js
// Based on this gist:
// JS Bin:,console
const cartesianProduct = ( =>
_.reduce((a, b) =>
_.flatMap(x => =>
View mina-nvm.rb
require 'mina/git'
require 'json'
set :domain, ''
set :user, 'nodejs'
set :deploy_to, '/home/nodejs/api'
set :repository, 'git@.../api.git'
set :branch, 'master'
set :shared_paths, [ 'tmp' ]
set :term_mode, :pretty
tadast /
Last active Sep 27, 2022 — forked from trcarden/gist:3295935
localhost SSL with puma
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
macbleser / wp-permissions-script
Created Feb 21, 2014
WordPress Permissions Configuration Script
View wp-permissions-script
# This script configures WordPress file permissions based on recommendations
# from
# Author: Michael Conigliaro
WP_OWNER=changeme # <-- wordpress owner
WP_GROUP=changeme # <-- wordpress group
WP_ROOT=/home/changeme # <-- wordpress root directory
bastosmichael / etc-network-interfaces
Last active Dec 30, 2015
Ubuntu NAT setup between eth0 and eth1
View etc-network-interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active Sep 6, 2022
Steps to install a Comodo PositiveSSL certificate with Nginx.
View install-comodo-ssl-cert-for-nginx.rst

Setting up a SSL Cert from Comodo

I use as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert