Skip to content

Instantly share code, notes, and snippets.

View theowenyoung's full-sized avatar

Owen theowenyoung

View GitHub Profile
@theowenyoung
theowenyoung / relay.js
Last active August 10, 2020 07:29
pipedream webhook relay
const normalizeHeaderCase = require("header-case-normalizer");
const defaultResponse = `This API enables relay requests to anywhere.
Usage:
https://eno9s1l2xztg49j.m.pipedream.net/ Shows help
https://eno9s1l2xztg49j.m.pipedream.net/<url> Create a request to <url>, and relay <url> response in the response.
]Source code : https://pipedream.com/@theowenyoung/http-relay-p_JZCLbG
`
function parseURL(req_url) {
@theowenyoung
theowenyoung / gatsby-node.js
Last active April 24, 2020 13:42
gatsby create node question
exports.sourceNodes = function () {
// I know I can't query the graphql data in `sourceNodes` lifecycle, just a example.
// My question is which lifecycle can I query the data, and create new node before createPages
// like this:
const allMarkdownRemarkResult = await graphql(`