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
# Automate npm updating when using nvm-windows | |
# Installs npm@latest for the current active node install | |
# Source: https://github.com/coreybutler/nvm-windows/issues/300#issuecomment-368192283 | |
$ErrorActionPreference = "Stop" | |
# Create a folder in the Temp directory and return it | |
# Source: https://stackoverflow.com/a/34559554/9165387 | |
function New-TemporaryDirectory { | |
$parent = [System.IO.Path]::GetTempPath() | |
$name = [System.IO.Path]::GetRandomFileName() |
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
async register () { | |
try { | |
const user = await this.$store.dispatch('auth/register', this.form) | |
console.log('User registered', user) | |
} catch (error) { | |
console.log('Fail in local component', error) | |
} | |
}, | |
async lo |
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
async function findOrCreateUser(user, field, value) { | |
const user = await User.where({ | |
[field]: value | |
}).fetch() | |
if (user) return user | |
} |
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 | |
/** | |
* Cart Page | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/cart/cart.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |
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 routify = (() => { | |
let openVnode | |
let links | |
function eventHandler(e) { | |
e.preventDefault() | |
const target = e.target.attributes[0].value | |
openVnode.context.$router.push({ path: target }) | |
} | |
return { |
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 id="content"> | |
<page-header | |
v-if="page.acf.header.title" | |
:title="page.acf.header.title" | |
:alt="page.acf.header.alt || false" | |
:content="page.acf.header.introduction" /> |
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 /* Template Name: Blog Template */ ?> | |
<?php get_header(); ?> | |
<?php the_content(); ?> | |
<?php get_footer(); ?> |
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 /* Template Name: Blog Template */ ?> | |
<?php get_header(); ?> | |
<?php the_content(); ?> | |
<?php get_footer(); ?> | |
some html |
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
.page-leave-active { | |
animation: blurOut 0.3s ease-in both; | |
overflow-y: hidden !important; | |
} | |
.page-enter-active { | |
animation: blurIn 0.3s ease-in both; | |
} |
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 firebase from './index' | |
const db = firebase.firestore() | |
export default db |