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
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
<?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
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
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
# 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
# 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
const path = require('path') | |
const { readFile, writeFile } = require('fs').promises | |
const glob = require('fast-glob') | |
const mjml2html = require('mjml') | |
const outputExtension = 'hbs' | |
async function start () { | |
// Todo: clear emails before | |
const templates = await glob('./src/emails/**/*.mjml') | |
try { | |
const compiledTemplates = await Promise.all( |
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
Child | |
<template> | |
<no-ssr> | |
<vuetable | |
ref="vuetable" | |
:api-url="apiURL" | |
:slots="$slots" | |
v-bind="tableOptions" | |
v-on="$listeners" /> | |
<!-- here i want to use the slots from the other 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
import Echo from 'laravel-echo' | |
import Vue from 'vue' | |
window.io = require('socket.io-client') | |
const host = process.env.WEBSOCKET | |
/** | |
* In Components you can now write | |
* socket: { | |
channels: [ | |
{ | |
'nice-public': { |