$ cat > .env << EOL
foo=foo
foobar="foo bar"
EOL
$ env grep -v '^#' .env | xargs -d '\n' -t
echo foo=foo foobar="foo bar"
env: ‘bar"’: No such file or directory
This file contains hidden or 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 lang="pug"> | |
svg(viewBox="0 0 119 20" version="1.1" xmlns="http://www.w3.org/2000/svg") | |
rect(v-for="p, index in om" width="1" :height="p === 0 ? 1 : p" :key="index" :x="index * 2" :y="p === 0 ? 19 : 20 - p" fill="#999") | |
</template> | |
<script> | |
export default { | |
data () { | |
return { |
This file contains hidden or 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 marked = require('marked') | |
self.onmessage = function (event) { | |
switch (event.data) { | |
case 'next': | |
next(event.data) | |
break | |
case 'license': | |
license(event.data) | |
break |
This file contains hidden or 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
FROM mhart/alpine-node:10.10.0 as full | |
WORKDIR /app | |
ENV HOST 0.0.0.0 | |
COPY . . | |
RUN npm ci | |
RUN npm run build | |
RUN rm -rf node_modules | |
# Magic! | |
RUN npm ci nuxt-start-edge debug --production |
This file contains hidden or 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
* | |
!assets | |
!pages | |
!static | |
!nuxt.config.js | |
!package*.json |
This file contains hidden or 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
@babel | |
@csstools | |
@nuxtjs | |
@vue | |
@webassemblyjs | |
@xtuc | |
accepts | |
acorn | |
acorn-dynamic-import | |
ajv |
This file contains hidden or 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' | |
// https://vuejs.org/v2/guide/custom-directive.html | |
Vue.directive('links', { | |
// Called only once, when the directive is first bound to the element. This is where you can do one-time setup work. | |
bind (el) { | |
const navigate = event => { | |
const href = event.target.getAttribute('href') | |
event.preventDefault() | |
if (href && href[0] === '/') { |
This file contains hidden or 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 v-html="content" /> | |
</template> | |
<script> | |
export default { | |
props: { | |
content: { | |
type: String, | |
default: '' |
This file contains hidden or 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 lang="pug"> | |
h1(v-html="content") | |
</template> | |
<script> | |
export default { | |
props: { | |
content: { | |
type: String, | |
default: '' |
This file contains hidden or 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 notify_post ($post_id) { | |
$request = new WP_REST_Request('GET', '/wp/v2/posts/' . $post_id); | |
$response = rest_do_request($request); | |
$status = $response->get_status(); | |
$data = $response->get_data(); | |
$callback_uri = 'https://example.com'; | |
wp_safe_remote_post($callback_uri, array('body' => json_encode($data))); | |
} | |
add_action('post_updated', 'notify_post'); |