Skip to content

Instantly share code, notes, and snippets.

View inlightmedia's full-sized avatar

Josh Dyck inlightmedia

  • inLight Media
  • St. Catharines, ON, Canada
View GitHub Profile
@inlightmedia
inlightmedia / gist:3cbf08918f3c4bcd474be73a9b5991ec
Created September 23, 2021 06:33
Finding duplicate relations in prisma1 export data.
const numberOfRelationJSONFiles = 131; // NOTE: Change this to the number of json files in the relation folder
for (let i=1; i <= numberOfRelationJSONFiles; i++ ) {
let filename = ``;
if (i < 10) {
filename = `00000${i}`
}
if (i < 100 && i > 9) {
filename = `0000${i}`
}
// API
router.get('/words', async (req, res) => {
const wordsRef = db.ref(`words`).once('value');
const usersRef = db.ref(`users`).once('value');
const values = await Promise.all([wordsRef, usersRef]);
const wordsVal = values[0].val();
const userVal = values[1].val();
res.sendStatus(200);
});
Verifying my Blockstack ID is secured with the address 14YhhuFs7n6FqFSr3vKDKU5ktJMqcEw9Lt https://explorer.blockstack.org/address/14YhhuFs7n6FqFSr3vKDKU5ktJMqcEw9Lt
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="http://www.parsecdn.com/js/parse-latest.js"></script>
</head>
<body>
Parse.initialize("<APP_ID GOES HERE>");
Parse.serverURL = '<URL GOES HERE>';
var user = new Parse.User();
user.set("username", "josh.dyck@inlightmedia.ca");
user.set("password", "pass001");
user.set("gender", "male");
user.set("role", "manager");
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="http://www.parsecdn.com/js/parse-latest.js"></script>
</head>
<body>