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
const {execSync, spawn} = require('child_process') | |
const result = execSync('code --list-extensions') | |
const list = String(result) | |
.split('\n') | |
.filter(Boolean) | |
.map( | |
x => `- [${x}](https://marketplace.visualstudio.com/items?itemName=${x})` | |
) |
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
#!/usr/bin/env node | |
/** | |
* Shell script reads now.json and .env.build files | |
* to add, update, remove Zeit.co now secrets | |
* | |
* Usage: | |
* ./now_secrets add | |
* ./now_secrets update | |
* ./now_secrets remove | |
* |
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
- Open Automator | |
- File -> New -> Service | |
- Change "Service Receives" to "files or folders" in "Finder" | |
- Add a "Run Shell Script" action | |
- Change "Pass input" to "as arguments" | |
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*" | |
- Save it as something like "Open in Visual Studio 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
<template> | |
<!--MAIN--> | |
<main> | |
<!--PAYMENT--> | |
<div class="registerAddress mt-3"> | |
<div class="container-fluid c-section"> | |
<div class="row"> | |
<div class="col-sm-3"></div> | |
<div class="col-sm-6"> | |
<div class="a-section a-spacing-medium"> |
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
// State | |
export const state = () => ({ | |
// Cart | |
cart: [], | |
cartLength: 0, | |
// Shipping | |
shipmentType: "", | |
shippingPrice: 0, | |
shippingEstimatedDelivery: "" |
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
const router = require("express").Router() | |
const moment = require("moment") | |
const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY) | |
const verifyToken = require("../middlewares/verify-token") | |
const Order = require("../models/order") | |
const Product = require("../models/product") | |
// SHIPMENT COSTS | |
const SHIPMENT = { | |
normal: { |
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
const mongoose = require("mongoose") | |
const Schema = mongoose.Schema | |
const OrderSchema = new Schema({ | |
owner: { type: Schema.Types.ObjectId, ref: "User" }, | |
products: [ | |
{ | |
productID: { type: Schema.Types.ObjectId, ref: "Product" }, | |
quantity: Number, | |
price: Number, |
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
datasource db { | |
provider = "mysql" | |
url = "mysql://user:password@mysql.myserver.com:3306/mydb?sslmode=preferred" | |
default = true | |
} | |
generator photon { | |
provider = "photonjs" | |
} |
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
/* Function to download a Google Map as an image file using Webix 6.4.3 | |
* https://www.webix.com | |
* Solving this issue: Maps were downloaded with ugly white backgrounds or borders | |
* https://forum.webix.com/discussion/comment/25148#Comment_25148 | |
* @author: Tobias Klemmer | |
* @date: 06.08.2019 | |
*/ | |
function Google_Map_to_PNG(viewId) { | |
// https://www.webix.com |
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
{ | |
"version": 2, | |
"name": "vue-share", | |
"builds": [{ "src": "package.json", "use": "@now/static-build" }], | |
"routes": [ | |
{ "src": "^/js/(.*)", "dest": "/js/$1" }, | |
{ "src": "^/css/(.*)", "dest": "/css/$1" }, | |
{ "src": "^/img/(.*)", "dest": "/img/$1" }, | |
{ "src": ".*", "dest": "/index.html" } | |
] |
NewerOlder