Skip to content

Instantly share code, notes, and snippets.

View xplodedthemes's full-sized avatar
🎯
Focusing

Georges Haddad xplodedthemes

🎯
Focusing
View GitHub Profile
@xplodedthemes
xplodedthemes / nightmare-on-amazon-linux.MD
Last active July 20, 2017 04:49 — forked from dimkir/nightmare-on-amazon-linux.MD
How to run nightmare on Amazon Linux

Running nightmare on Amazon Linux

You may have thought of running nightmare on AWS Lambda. But before we can run it on Lambda, we need first to make it run on Amazon Linux.

Provision instance which replicates Lambda environment

According to AWS Documentation on Lambda Execution Environment and available Libraries we would need this AMI image with this alias amzn-ami-hvm-2016.03.3.x86_64-gp2. Keep in mind that AMI-image-id for this instance would be different in different regions (eg):

  • In eu-west-1 - ami-f9dd458a
  • In us-east-1 - ami-6869aa05
@xplodedthemes
xplodedthemes / .env
Last active October 8, 2021 07:05
Ticksy External Purchase Verification Freemius Integration
FS_API_SCOPE="developer"
FS_API_DEV_ID=000
FS_API_PUBLIC_KEY=""
FS_API_SECRET_KEY=""
TICKSY_SECRET_KEY=""
@xplodedthemes
xplodedthemes / edd.php
Last active October 8, 2021 07:13
Freemius EDD Migration Helper in case EDD License keys have a custom prefix and are over 32 chars.
<?php
/*
....
Within plugin EDD Migration Client edd.php
*/
/**
* You should use your own unique CLASS name, and be sure to replace it
* throughout this file. For example, if your product's name is "Awesome Product"
function prefix_wc_minimum_order_amount() {
// Set this variable to specify a minimum order value
$minimum = 100;
if ( WC()->cart->total < $minimum ) {
$message = sprintf( 'You must have an order with a minimum of %s to place your order, your current order total is %s.' ,
wc_price( $minimum ),
wc_price( WC()->cart->total )