Inside gatsby-browser.js
import Amplify, { Auth } from 'aws-amplify';
import awsconfig from './src/aws-exports'
Amplify.configure(awsconfig);
*~ | |
.DS_Store | |
.svn | |
.cvs | |
*.bak | |
*.swp | |
Thumbs.db | |
# wordpress specific | |
wp-config.php |
# Logs | |
logs | |
*.log | |
npm-debug.log* | |
yarn-debug.log* | |
yarn-error.log* | |
lerna-debug.log* | |
# Diagnostic reports (https://nodejs.org/api/report.html) | |
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json |
(function (wp) { | |
var registerPlugin = wp.plugins.registerPlugin; | |
var PluginMoreMenuItem = wp.editPost.PluginMoreMenuItem; | |
// var image = wp.icons.image; | |
var el = wp.element.createElement; | |
var withDispatch = wp.data.withDispatch; | |
var MoreItem = function (props) { | |
return el(PluginMoreMenuItem, |
exports.createSchemaCustomization = ({ actions }) => { | |
const { createFieldExtension, createTypes } = actions; | |
createFieldExtension({ | |
name: `parent`, | |
description: `Proxy resolver from a parent's field.`, | |
args: { | |
from: `String!` | |
}, |
exports.withThemePath = (relativePath, root = __dirname) => { | |
const qualifiedPath = relativePath.replace('./src', `${root}/src`); | |
let qualifiedResolvedPath = path.resolve(qualifiedPath); | |
let finalPath = qualifiedResolvedPath; | |
const theme = path.basename(root); | |
const themedPath = relativePath.replace('./src', `./src/${theme}`); | |
let themedResolvedPath = path.resolve(themedPath); | |
try { |
# Install `dnsmasq` and configure for *.dev domains | |
$ brew install dnsmasq | |
$ vim /usr/local/etc/dnsmasq.conf | |
# Reload configuration and clear cache | |
$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
$ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
$ dscacheutil -flushcache |
<?php | |
/** | |
* Init Proxy endpoints. | |
* | |
* @return void | |
*/ | |
public function rest_api_init() { | |
/** |
<?php | |
/** | |
* Validate Slack notification signature. | |
* | |
* @see https://api.slack.com/docs/verifying-requests-from-slack | |
* | |
* @param array $headers POST headers. | |
* @param string $response_body JSON string of body. | |
* @param string $signing_secret Slack secret. |
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Demo</title> | |
<script src="https://media-library.cloudinary.com/global/all.js"></script> | |
<script type="text/javascript"> | |
const mloptions = { | |
cloud_name: '<CHANGE_THIS>', | |
api_key: '<CHANGE_THIS>', |