Skip to content

Instantly share code, notes, and snippets.

View jsonpreet's full-sized avatar
🎯
Focusing

MrPreet jsonpreet

🎯
Focusing
View GitHub Profile
@jsonpreet
jsonpreet / category-food.js
Created April 7, 2023 14:55 — forked from JEverhart383/category-food.js
Faust Custom Template Registration
import { gql } from '@apollo/client';
import * as MENUS from '../constants/menus';
import { BlogInfoFragment } from '../fragments/GeneralSettings';
import {
Header,
Footer,
Main,
Container,
EntryHeader,
NavigationMenu,
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";
@jsonpreet
jsonpreet / .deps...github...harpreet9629...WolfgameFork...WolfgameFork...Address.sol
Created February 8, 2022 20:05
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
@jsonpreet
jsonpreet / README.txt
Created February 8, 2022 18:27
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS
@jsonpreet
jsonpreet / desocalevents.js
Created February 1, 2022 17:00 — forked from kennyjacobson/desocalevents.js
Gets only those posts whose postExtraData has a key called `type` with a value set to `event`
app.post('/events', async function(req, res) {
// Add your code here
const lastPostHashHex = req.body.lastPostHashHex
const username = req.body.username
console.log("publicKey",publicKey)
const desoApi = new DesoApi()
const returnedPosts = await desoApi.getPostsForPublicKey("",publicKey,lastPostHashHex,50)
console.log(returnedPosts)