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 { defineNuxtPlugin } from '#app' | |
import * as Sentry from '@sentry/vue' | |
export default defineNuxtPlugin((nuxtApp) => { | |
const router = useRouter() | |
const config = useRuntimeConfig() | |
Sentry.init({ | |
app: nuxtApp.vueApp, | |
dsn: config.public.sentryDsn, |
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 { createReadStream } from 'node:fs'; | |
import { parse } from 'csv-parse'; | |
async function efficientReadAndParse() { | |
const readStream = createReadStream('VEStdEquip.csv', 'utf-8').pipe(parse({ delimiter: ',', columns: ['VehicleKey', 'EquipDescription'] })); | |
for await (const data of readStream) { | |
await processData(data); | |
} |
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 { defineNuxtPlugin } from '#app' | |
import * as Sentry from '@sentry/vue' | |
export default defineNuxtPlugin((nuxtApp) => { | |
const router = useRouter() | |
const config = useRuntimeConfig() | |
Sentry.init({ | |
app: nuxtApp.vueApp, | |
dsn: config.public.sentryDsn, |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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 basicDetails = { | |
initial: 'restore_application', | |
states: { | |
restore_application: { | |
on: { NEXT_CARD: 'submit_details' } | |
}, | |
submit_details: { | |
on: { PREVIOUS_CARD: 'restore_application' }, | |
type: 'final' | |
} |
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
<?php | |
namespace App\Http; | |
use Illuminate\Foundation\Http\Kernel as HttpKernel; | |
use Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful; | |
class Kernel extends HttpKernel | |
{ | |
/** |
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
Laravel configuration | |
===================== | |
composer packages | |
----------------- | |
"php": "^7.2.5", | |
"laravel/framework": "^7.0", | |
"fruitcake/laravel-cors": "^2.0", | |
"laravel/sanctum": "^2.4", |
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> | |
<div class="flex justify-center items-center h-screen"> | |
<div class="w-full max-w-xs"> | |
<form class="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4"> | |
<div class="mb-4"> | |
<label | |
class="block text-gray-700 text-sm font-bold mb-2" | |
for="username" | |
> | |
Username |
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 { | |
/* | |
** Nuxt.js modules | |
*/ | |
modules: [ | |
// Doc: https://axios.nuxtjs.org/usage | |
"@nuxtjs/axios", | |
// Doc: https://github.com/nuxt-community/auth-module | |
"@nuxtjs/auth" |
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 Vue from 'vue' | |
// Importing all components inside './components' folder | |
const req = require.context('./components/', true, /\.(js|vue)$/i); | |
req.keys().map(key => { | |
const fileNameKey = key.substr(key.lastIndexOf('/') + 1); | |
const name = fileNameKey.match(/\w+/)[0]; | |
return Vue.component(name, req(key).default) | |
}); |
NewerOlder