curl -X POST 'https://api-sandbox.astra.finance/v1/oauth/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-u your_client_id:your_client_secret \
-d 'grant_type=authorization_code' \
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"> | |
<title>Test Page</title> | |
<script> | |
// early compute the vw/vh units more reliably than CSS does itself | |
computeViewportDimensions(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { config } from 'dotenv' | |
import Shopify from 'shopify-api-node' | |
import cryptographer from '@brixtol/cryptographer' | |
config() | |
export const crypto = cryptographer(process.env.SHOPIFY_AUTH_SECRET) | |
/** | |
* Request Headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import m from 'mithril' | |
import loadjs from 'loadjs' | |
/* CONSTANTS ---------------------------------- */ | |
const AUTH_API = 'https://api.brixtol.com/shopify/customer/auth' | |
/** | |
* Facebook SDK OAuth | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- form 'product' | |
, product | |
, data-product-form: '' | |
, data-product-handle: product.handle | |
, data-enable-history-state: 'true' -%} | |
<div | |
class="row jc-center no-gutters mt-3 product-purchase" | |
data-controller="purchase" | |
data-purchase-selected-value="selected"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createHash, createDecipheriv, createCipheriv, getCiphers, getHashes } from 'crypto' | |
import os from 'os' | |
/** | |
* Creates hash of an string based on available hashes of platform | |
* | |
* @param {string} input | |
* @param {string} hash | |
* @returns {string} | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener("DOMContentLoaded", function(){ | |
thumbnails = document.querySelectorAll('img[src*="/products/"]'); | |
function addEventListenerList(thumbnails) { | |
for (var i = 0, len = thumbnails.length; i < len; i++) { | |
console.log(thumbnails[i].currentSrc); | |
thumbnails[i].addEventListener('click', thumbImageSwap, false); | |
} | |
} | |
function thumbImageSwap(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import m from 'mithril' | |
export default ({ | |
lowStock, | |
remains, | |
name, | |
colour, | |
price, | |
pricing, | |
percent, |
-
Recommendation Martin Shkreli Finance Lesson
-
Book: White Noise by Don DeLillo
-
Nietzsche, Kirkegard, Kafka are accessible reading material
-
David Foster Wallace
- Post-Modernism is irony, cynicism, deprication, seen in Fight Club