Skip to content

Instantly share code, notes, and snippets.

View ejntaylor's full-sized avatar
🚢
Shipping

Elliot ejntaylor

🚢
Shipping
View GitHub Profile
@ejntaylor
ejntaylor / SignAwsRequest.php
Last active December 5, 2023 12:17
Middleware to sign lambda requests
<?php
namespace App\Http\Integrations\Middleware;
use Aws\Credentials\CredentialProvider;
use Aws\Credentials\CredentialsInterface;
use Aws\Signature\SignatureV4;
use Saloon\Contracts\RequestMiddleware;
use Saloon\Http\PendingRequest;

Keybase proof

I hereby claim:

  • I am ejntaylor on github.
  • I am ejntaylor (https://keybase.io/ejntaylor) on keybase.
  • I have a public key ASDgnZFtjzuxhtH9z5DmsDWk-Sk-w3ceHLX4PEVqr0Axswo

To claim this, I am signing this object:

@ejntaylor
ejntaylor / dependabot.yml
Created July 26, 2021 08:28
Example Dependabot yml file
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
@ejntaylor
ejntaylor / functions.php
Created September 17, 2014 15:12
WooCommerce Shipping Calculated after Coupon
<?php
// WooCommerce Shipping Calculated after Coupon
add_filter( 'woocommerce_shipping_free_shipping_is_available', 'filter_shipping', 10, 2 );
function filter_shipping( $is_available, $package ) {
if ( WC()->cart->prices_include_tax )
$total = WC()->cart->cart_contents_total + array_sum( WC()->cart->taxes );
else
@ejntaylor
ejntaylor / functions.php
Last active January 3, 2021 10:59
WooCommerce subscriptions without credit card
<?php
// Free Trial - Let GF Reg use email as username
/**
* WordPress register with email only, make it possible to register with email
* as username in a multisite installation
* @param Array $result Result array of the wpmu_validate_user_signup-function
* @return Array Altered result array
*/
function custom_register_with_email($result) {

Keybase proof

I hereby claim:

  • I am raisonon on github.
  • I am ejntaylor (https://keybase.io/ejntaylor) on keybase.
  • I have a public key ASAu6CghDrDJ7IuwViXTe6GRoqpNRtqzchn1IOIvdF1rkAo

To claim this, I am signing this object:

@ejntaylor
ejntaylor / web.php
Created June 26, 2020 12:04
Statamic Nova Test 2
<?php
// Auth
Auth::routes();
// Statamic
Route::name('statamic.')->group(function () {
/**
* Glide
@ejntaylor
ejntaylor / web.php
Created June 24, 2020 13:22
Statamic and Nova route example problem
<?php
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;
use Statamic\Facades\OAuth;
use Statamic\Statamic;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
@ejntaylor
ejntaylor / pagination-functions.php
Last active May 17, 2020 06:06
Replace WooCommerce Default Pagination with WP-PageNavi Pagination for Woo Canvas or WooCommerce Pagination
/**
* Replace WooCommerce Default Pagination with WP-PageNavi Pagination for Woo Canvas
**/
add_action('init','alter_woo_hooks');
function alter_woo_hooks() {
remove_action( 'woocommerce_after_main_content', 'canvas_commerce_pagination', 01, 0 );
}
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use VictorYoalli\LaravelCodeGenerator\Facades\CodeGenerator;
use VictorYoalli\LaravelCodeGenerator\Facades\CodeHelper;
use VictorYoalli\LaravelCodeGenerator\Facades\ModelLoader;
function printif($type, $filename, $msg = '✖ Not generated ')