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
<script> | |
export default { | |
props: { | |
span: { | |
type: String, | |
default: null | |
} | |
}, | |
render: function (createElement) { | |
return createElement( |
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 imgOops id => { | |
const images = require.context('@/static/img/', true, /\.(png|jpe?g|svg)$/) | |
const obj = {} | |
images.keys().forEach(key => { | |
const code = key.split('./').pop() | |
.substring(0, key.length - 6) // remove extension | |
obj[code] = images(key) | |
}) | |
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
require('dotenv').config() | |
const csv = require('csvtojson') | |
const { asyncForEach } = require('./helpers') | |
const { read, write } = require('./fs') | |
const fetch = require('node-fetch') | |
const { DOMAIN, USERNAME, PASSWORD } = process.env | |
const convert = async (source, code, type) => { | |
try { |
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
## Delete a remote branch | |
$ git push origin --delete <branch> # Git version 1.7.0 or newer | |
## Delete a local branch | |
$ git branch --delete <branch> | |
$ git branch -d <branch> # Shorter version | |
$ git branch -D <branch> # Force delete un-merged branches | |
## Delete a local remote-tracking branch | |
$ git branch --delete --remotes <remote>/<branch> |
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
curl -LO https://wordpress.org/latest.zip && \ | |
unzip latest.zip && \ | |
rm latest.zip |
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
<script type="application/ld+json"> | |
{ | |
"@context": "https:\/\/schema.org", | |
"@type":"Person", | |
"url":"https:\/\/johndoe.com\/", | |
"sameAs":[ | |
"https:\/\/www.facebook.com\/johndoe\/", | |
"https:\/\/www.instagram.com\/johndoe\/", | |
"https:\/\/twitter.com\/johndoe\/" | |
], |
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
<?php | |
function pwa_preview_link() { | |
$slug = basename(get_permalink()); | |
$pwadomain = 'https:/example.com'; | |
$pwadir = '/'; | |
$pwaurl = "$pwadomain$pwadir$slug"; | |
return "$pwaurl"; | |
} | |
add_filter('preview_post_link', 'pwa_preview_link'); |
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
class EventEmitter { | |
constructor() { this.events = {} } | |
getEventListByName(eventName){ | |
if(typeof this.events[eventName] === 'undefined'){ | |
this.events[eventName] = new Set() | |
} | |
return this.events[eventName] | |
} |
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 amqp = require('amqplib') | |
const eventEmitter = require('events') | |
class OopsEmitter extends eventEmitter {} | |
const oopsEmitter = new OopsEmitter() | |
;(async () => { | |
try { | |
const conn = await amqp.connect('amqp://localhost?heartbeat=5s') | |
const ch = await conn.createChannel() |
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
<script> | |
export default { | |
computed: { | |
theme () { | |
const [color, backgroundColor] = this.$store.state.theme | |
return { | |
'--color': color, | |
'--background-color': backgroundColor | |
} | |
} |