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
# create order | |
-------------------- | |
Request: curl -X 'POST' -d '{"order":{"id":0,"number":0,"order_number":0,"updated_at":"","user_id":"","customer":{"id":0,"email":"[email protected]","accepts_marketing":false,"created_at":"","updated_at":"","first_name":"Elijah","last_name":"Atamas","orders_count":0,"state":"","total_spent":"","last_order_id":0,"note":null,"verified_email":false,"multipass_identifier":null,"tax_exempt":false,"tags":"","last_order_name":"","currency":"","accepts_marketing_updated_at":"","marketing_opt_in_level":null,"tax_exemptions":null,"admin_graphql_api_id":""},"line_items":[{"variant_id":39869281009856,"quantity":1}],"shipping_address":{"address1":"Hlinky St, 2","city":"Dnipro","country":"Ukraine","first_name":"Elijah","last_name":"Atamas","phone":"555-625-1199","zip":"49000","country_code":"UA"},"shipping_lines":[{"code":"shopify-Standard-0.73","price":"0.73","title":"Standard"}],"transactions":[{"id":0,"parent_id":0,"kind":"authorization","status":"success","currency":"","amount":"7 |
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
if (window.location.pathname == "/cart") { | |
fetch("/cart.js") | |
.then((res) => res.json()) | |
.then((t) => JSON.stringify(t.items.map((t) => [t.product_title, t.id, t.quantity]))) | |
.then(JSON.stringify) | |
.then(btoa) | |
.then((qcCartId) => { | |
console.log("QC CART ID", qcCartId); | |
var checkoutButton = document.querySelector("input[name=checkout]"); |
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
[ | |
{ | |
"userId": 1, | |
"id": 1, | |
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit", | |
"body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto" | |
}, | |
{ | |
"userId": 1, | |
"id": 2, |
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
[ | |
{ | |
"postId": 1, | |
"id": 1, | |
"name": "id labore ex et quam laborum", | |
"email": "[email protected]", | |
"body": "laudantium enim quasi est quidem magnam voluptate ipsam eos\ntempora quo necessitatibus\ndolor quam autem quasi\nreiciendis et nam sapiente accusantium" | |
}, | |
{ | |
"postId": 1, |
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
apiVersion: apps/v1beta2 | |
kind: Deployment | |
metadata: | |
name: vte-example | |
labels: | |
app: vte-example | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: |
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
type Replace<Target extends Record<string, any>, Value extends any> = { | |
[Key in keyof Target]: Target[Key] extends object | |
? Replace<Target[Key], Value> | |
: Value | |
} |
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
{ | |
"workbench.colorTheme": "One Dark Pro Bold", | |
"editor.fontFamily": "'Fira Code'", | |
"editor.fontLigatures": true, | |
"window.zoomLevel": 0.9, | |
"workbench.iconTheme": "file-icons", | |
"workbench.statusBar.visible": false, | |
"editor.minimap.enabled": false, | |
"editor.scrollBeyondLastLine": false, | |
"files.insertFinalNewline": true, |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "esnext", | |
"module": "esnext", | |
"lib": ["esnext"], | |
"jsx": "preserve", | |
"moduleResolution": "node", | |
"allowSyntheticDefaultImports": true, | |
"esModuleInterop": true, |
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 ava from 'ava' | |
import nanoid from 'nanoid' | |
import mongoose from 'mongoose' | |
/* | |
test wrapper for ava | |
creates new database and drops it afterwards | |
*/ | |
export const test = (message, cb) => | |
ava(message, async (t) => { |
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
export default { | |
compileEnhancements: false, | |
extensions: ['ts'], | |
require: ['ts-node/register', 'tsconfig-paths/register'], | |
sources: ['src/**/*'], | |
} |
NewerOlder