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 { PrismaClient } = require('@prisma/client'); | |
const prisma = new PrismaClient(); | |
const { stripe } = require('../utils/stripe'); | |
const createCheckoutSession = async (priceId, userId, userEmail) => { | |
try { | |
let customer = await createStripeCustomer(userEmail); | |
const session = await stripe.checkout.sessions.create({ |
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 class Mask { | |
static cpf_cnpj(value) { | |
return value | |
.replace(/\D/g, '') | |
.replace(/(\d{3})(\d)/, '$1.$2') | |
.replace(/(\d{3})(\d)/, '$1.$2') | |
.replace(/(\d{3})(\d{1,2})/, '$1-$2') | |
.replace(/(\d{2})(\d)(\.)(\d{2})(\d)(\.)(\d{2})(\d)(\-)(\d{3})/, '$1.$2$4.$5$7/$8$10') | |
.replace(/(\/\d{4})(\d{1,2})/, '$1-$2') | |
.replace(/(-\d{2})\d+?$/, '$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
const captures = [ | |
{ | |
"placa": "NA123", | |
"data_hora": "07/05/2019 14:28:46" | |
}, | |
{ | |
"placa": "NA333", | |
"data_hora": "07/05/2019 14:28:46" | |
}, | |
{ |
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
"styles": [ | |
"src/styles.scss" | |
], | |
"stylePreprocessorOptions": { | |
"includePaths": [ | |
"src/scss/_utilities" | |
] | |
}, | |
//https://scotch.io/tutorials/angular-shortcut-to-importing-styles-files-in-components |
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 bcrypt = require('bcryptjs'); | |
const UserSchema = new mongoose.Schema({ | |
name: { | |
type: String, | |
required: true | |
}, | |
email: { | |
type: 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
[{ | |
"date": "Date", | |
"sales": [ | |
{ | |
"customerName": "string", | |
"customerPhone": "string", | |
"paymentMethod": "credit", | |
"amount": 399.00, | |
"details": { | |
"installments": 3, |
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
web: node index.js |
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 times = [{id:'time a'},{id:'time b'},{id:' time c'},{id:'time d'},{id:'time e'}]; | |
const groups = (arr) => { | |
const output = []; | |
for(i = 0; i < arr.length; i++){ | |
for(j = 1; j < arr.length; j++){ | |
if(arr[i].id == arr[j].id){ | |
continue; |
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
<audio id="streaming" controls="" autoplay="false"> | |
<source src="http://afiliadamix2.crossradio.com.br:9008/;" type="audio/mp4; codecs="mp4a.40.5""> | |
<source src="http://afiliadamix2.crossradio.com.br:9008/;" type="audio/aacp"> | |
<source src="http://afiliadamix2.crossradio.com.br:9008/;" type="audio/mpeg"> | |
<source src="http://afiliadamix2.crossradio.com.br:9008/;" type="audio/mp3"> | |
Your browser does not support the audio element. | |
</audio> |
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
/* | |
Grid Basic | |
Platform: Sass (.scss) | |
Original repository: | |
Author: | |
Paulo Tosi (paulotosi.com.br) | |
Version: 0.1.0 | |
* / | |
/*************************************************************************************************/ |
NewerOlder