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
let usStatesArray = [ | |
"Alaska", | |
"Alabama", | |
"Arkansas", | |
"American Samoa", | |
"Arizona", | |
"California", | |
"Colorado", | |
"Connecticut", | |
"District of Columbia", |
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 (module.hot) { | |
const hotEmitter = require("webpack/hot/emitter"); | |
const DEAD_CSS_TIMEOUT = 2000; | |
hotEmitter.on("webpackHotUpdate", function(currentHash) { | |
document.querySelectorAll("link[href][rel=stylesheet]").forEach((link) => { | |
const nextStyleHref = link.href.replace(/(\?\d+)?$/, `?${Date.now()}`); | |
const newLink = link.cloneNode(); | |
newLink.href = nextStyleHref; |
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 authenticationMiddleware () { | |
return (req, res, next) => { | |
console.log(`req.session.passport.user: ${JSON.stringify(req.session.passport)}`); | |
if (req.isAuthenticated()) return next(); | |
res.redirect('/login') | |
} | |
} |
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
new BrowserSyncPlugin({ | |
host: 'localhost', | |
port: 3001, | |
proxy: 'http://localhost:8081/', | |
files: [{ | |
match: [ | |
'**/*.hbs' | |
], | |
fn: function(event, file) { | |
if (event === "change") { |
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
/** | |
* Rotates coordinate system for velocities | |
* | |
* Takes velocities and alters them as if the coordinate system they're on was rotated | |
* | |
* @param Object | velocity | The velocity of an individual particle | |
* @param Float | angle | The angle of collision between two objects in radians | |
* @return Object | The altered x and y velocities after the coordinate system has been rotated | |
*/ |
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> | |
<section class="banner-section mb-16 lg:mb-0 relative"> | |
<div class="swiper-container"> | |
<div class="swiper-wrapper relative"> | |
<div class="banner-content swiper-slide"> | |
<div | |
class=" w-full hero-img bg-cover relative pb-8 sm:pb-16 md:pb-32" | |
> | |
<div class="overlay blue-overlay" /> | |
<div |
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> | |
<Transition | |
:css="false" | |
name="scale-in" | |
mode="out-in" | |
@before-enter="beforeEnter" | |
@enter="enter" | |
@leave="leave" | |
> | |
<slot /> |
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> | |
<Transition | |
name="fade-translate" | |
mode="out-in" | |
:css="false" | |
@before-enter="beforeEnter" | |
@enter="enter" | |
@leave="leave" | |
> | |
<slot /> |
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 express = require('express') | |
const consola = require('consola') | |
const { Nuxt, Builder } = require('nuxt') | |
const app = express() | |
// Import and Set Nuxt.js options | |
const config = require('../nuxt.config.js') | |
config.dev = process.env.NODE_ENV !== 'production' | |
async function start() { |
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
server { | |
listen 80; | |
server_name <Your_Domain_Name>; | |
location / { | |
proxy_pass http://localhost:3000; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; |