💅 Copy & Paste 💅
🚨 This will wipe away any code in your Glitch project and replace it with the code from Github, and reload your project, every time you push to your repo's
main
branch.
- Go to the Glitch
💻 Terminal
and run the following:
💅 Copy & Paste 💅
🚨 This will wipe away any code in your Glitch project and replace it with the code from Github, and reload your project, every time you push to your repo's
main
branch.
💻 Terminal
and run the following:# 💝 Use with jq 💝 | |
# jq -r -f ./xml.jq some.json | |
# cat some.json | jq -r -f ./xml.jq | |
# Download or install jq from: https://jqlang.github.io/jq/download/ | |
# Or: brew install jq | |
# Check out the manual: https://jqlang.github.io/jq/manual/ | |
# To understand how content_key and attr_prefix work, run this script on the following JSON: | |
# https://gist.github.com/doramatadora/5623ea90e63ea1c6a15141e2fea054e8 |
{ | |
"bookstore": { | |
"book": [ | |
{ | |
"id": "001", | |
"title": "The Great Gatsby", | |
"author": "F. Scott Fitzgerald", | |
"publication_year": "1925", | |
"genre": { | |
"@type": "fiction", |
module.exports = { | |
reactStrictMode: true, | |
webpack: (config, options) => { | |
config.externals = [ | |
({request,}, callback) => { | |
// Allow Webpack to handle fastly:* namespaced module imports by treating | |
// them as modules rather than try to process them as URLs | |
if (/^fastly:.*$/.test(request)) { | |
return callback(null, 'commonjs ' + request); | |
} |
I hereby claim:
To claim this, I am signing this object:
/\ /\ | |
//\\_//\\ ____ | |
\_ _/ / / | |
/ * * \ /^^^] | |
\_\O/_/ [ ] | |
/ \_ [ / | |
\ \_ / / | |
[ [ / \/ _/ | |
_[ [ \ /_/ |
// for when you want to mock/stub chained APIs | |
// useful with stuff like octokit, aws-sdk, neo4j-driver | |
// for avoiding nastiness, like, for e.g. octokit.git.getTree | |
// const octoStub = { octokit: { git: { getTree: jest.fn()) } } } | |
// this mocks/stubs everything to a specified depth | |
function mockChainedAPI(mock: any = jest.fn(), depth: number) { | |
return new Proxy({} as any, { | |
get: function(obj, prop) { | |
obj._depthCount = (obj._depthCount || 0) + 1; |