Skip to content

Instantly share code, notes, and snippets.

View fastdivision's full-sized avatar
💭
🛠⚡️🔥

Jake Johnson fastdivision

💭
🛠⚡️🔥
View GitHub Profile
@fastdivision
fastdivision / taxjar_plugindx_config.json
Created June 25, 2020 21:24
PluginDx Config for M2 TaxJar Extension
{
"config": [
{
"name": "TaxJar Email",
"path": "tax/taxjar/email"
},
{
"name": "TaxJar API Key",
"path": "tax/taxjar/apikey"
},
@fastdivision
fastdivision / class-wc-taxjar-integration.php
Last active July 22, 2019 20:15
TaxJar WooCommerce Plugin v1.6+ Shipping Overrides
<?php
/**
* Manually override shipping taxability in TaxJar for WooCommerce
* Tweak class-wc-taxjar-integration.php around line 332
* https://github.com/taxjar/taxjar-woocommerce-plugin/blob/1.6.1/includes/class-wc-taxjar-integration.php#L332
*/
// Make shipping taxable
if ( 'AZ' == $to_state ) {
$taxes['freight_taxable'] = 1;
<?php
$client->setApiConfig('headers', [
'X-TJ-Expected-Response' => 422
]);
@fastdivision
fastdivision / userstyle.css
Last active June 5, 2017 16:39
Sane Flowdock Redesign with Stylebot (Browser) or userstyle.css (Native Flowdock OS X App)
/*
* Sane Flowdock Redesign Overrides
* Option 1: Copy and paste CSS into Stylebot
* Option 2: Save file as `userstyle.css` inside ~/Library/Application Support/Flowdock, hit CMD+R to reload app
*/
body {
font-family: -apple-system, BlinkMacSystemFont, Arial, Helvetica, sans-serif !important;
}

Keybase proof

I hereby claim:

  • I am fastdivision on github.
  • I am jakejohnson (https://keybase.io/jakejohnson) on keybase.
  • I have a public key ASBtvoDpFqgn0MlR2KxjeWRRMY8BJUeAfW7KXMBgx42k_wo

To claim this, I am signing this object:

@fastdivision
fastdivision / Smartcalcs.php
Last active February 13, 2017 21:43
Magento + TaxJar Custom Product Taxability Exceptions by State
<?php
// Include around here:
// https://github.com/taxjar/taxjar-magento-extension/blob/master/app/code/community/Taxjar/SalesTax/Model/Smartcalcs.php#L236
// Taxable in one state, exempt in other exempt states
$specialTaxableProducts = array(1001, 1002, 1003, 1004); // Product IDs
// Tax these clothing products if shipped to PA
if (in_array($item->getProductId(), $specialTaxableProducts) && $address->getRegionCode() == 'PA') {
<?php
require __DIR__ . '/vendor/autoload.php';
$taxjar = TaxJar\Client::withApiKey('YOUR API TOKEN');
$order_taxes = $taxjar->taxForOrder([
'from_country' => 'US',
'from_zip' => '07001',
'from_state' => 'NJ',
'to_country' => 'US',
@fastdivision
fastdivision / smartcalcs-zend-http-demo.php
Last active August 11, 2016 21:15
TaxJar SmartCalcs /v2/taxes with Zend HTTP Client v2.5.3
<?php
require __DIR__ . '/vendor/autoload.php';
use Zend\Http\Client;
use Zend\Json\Json;
$apiKey = 'YOUR API KEY';
$apiUrl = 'https://api.taxjar.com/v2/taxes';
$client = new Client($apiUrl);
@fastdivision
fastdivision / fade.styl
Last active January 4, 2016 06:58
ng-view / ui-view Fade Animation with ng-animate
[ui-view]
position absolute
.fade
fadeSpeed = 333ms
-webkit-transition all fadeSpeed ease-in-out
-moz-transition all fadeSpeed ease-in-out
-o-transition all fadeSpeed ease-in-out
transition all fadeSpeed ease-in-out
opacity 1
@fastdivision
fastdivision / Gruntfile.js
Last active January 2, 2016 18:29
Yeoman Angular 0.7.1 Gruntfile with Divshot.io Integration
// Generated on 2014-01-09 using generator-angular 0.6.0
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {