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
export function useMoralis() { | |
// Moralis Initialization | |
let Moralis; | |
if (typeof window !== `undefined`) { | |
Moralis = require("moralis"); | |
Moralis.initialize(process.env.GATSBY_MORALIS_APPLICATION_ID); | |
Moralis.serverURL = process.env.GATSBY_MORALIS_SERVER_ID; | |
} | |
return { Moralis }; | |
} |
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 Moralis from "moralis"; | |
// Moralis Initialization | |
Moralis.initialize(`YOUR_APP_ID`); | |
Moralis.serverURL = `YOUR_SERVER_URL`; |
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 React from "react"; | |
const wrapper = { | |
backgroundColor: `rgb(197,250,3)`, | |
display: `flex`, | |
alignItems: `center`, | |
justifyContent: `center`, | |
flexDirection: `column`, | |
height: `100vh`, | |
}; |
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
{ | |
"name": "Platform First Pool", | |
"description": "A pool dedicated to building applications on top of Cardano", | |
"ticker": "PLFM", | |
"homepage": "https://platformfirst.co" | |
} |
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
DEBUG: yarn.lock needs updating (repository=julienp-test-org/gatsby-starter-blog, branch=renovate/react-helmet-6.x) | |
DEBUG: Updated 2 lock files (repository=julienp-test-org/gatsby-starter-blog, branch=renovate/react-helmet-6.x) | |
"updatedArtifacts": ["package-lock.json", "yarn.lock"] | |
DEBUG: 3 file(s) to commit (repository=julienp-test-org/gatsby-starter-blog, branch=renovate/react-helmet-6.x) | |
DEBUG: Committing files to branch renovate/react-helmet-6.x (repository=julienp-test-org/gatsby-starter-blog, branch=renovate/react-helmet-6.x) | |
DEBUG: Error commiting files (repository=julienp-test-org/gatsby-starter-blog, branch=renovate/react-helmet-6.x) | |
"err": { | |
"task": { | |
"commands": [ | |
"push", |
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
module.exports = { | |
/* endpoint: 'https://api.github.com/', */ | |
token: 'xxx', | |
platform: 'github', | |
logLevel: 'debug', | |
onboardingConfig: { | |
extends: ['config:base'], | |
}, | |
repositories: ['julienp-test-org/gatsby-starter-blog'], | |
renovateFork: true, |
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
// You're hosting an event, and the admission tickets are expensive. Groups of people are trying to cheat the system by using the same tickets multiple times. Stop them! | |
// 1) Create a constructor function called Ticket that takes one parameter, code, and creates a Ticket object. | |
// The Ticket object will have the following parameters: | |
// code : a string that stores the ticket code | |
// used : a boolean that stores whether or not the ticket has been used yet | |
// useTicket: a function registers that the ticket has been used and prevents reuse or tampering | |
// 2) Create a function called validTicket to check whether the ticket is valid and return true or false. For a ticket to be valid, | |
// the ticket code must match the correct code, and the ticket must be unused. |
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
// Print out the grade-school multiplication table up to 12x12 | |
function multiplicationTable(maxValue) { | |
for (var i = 1; i <= maxValue; i++) { | |
let line | |
for (var j = 1; j <= maxValue; j++) { | |
line = line + ` ${j * i}`; | |
} | |
console.log(line) | |
} |
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
/** rest of code above **/ | |
server.get("/post/:id", async (req, res) => { | |
const postId = req.params.id; | |
// Use the post API from prisma client | |
try { | |
const post = await prisma.post({ | |
id: postId | |
}); | |
const author = await prisma |
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
/** rest of code above **/ | |
server.get("/posts", async (_req, res) => { | |
// Use the posts API from prisma client | |
try { | |
const posts = await prisma.posts({ | |
where: { | |
published: true | |
} | |
}); |