Skip to content

Instantly share code, notes, and snippets.

View frankiefab100's full-sized avatar
πŸ‘¨β€πŸ’»
Learning, relearning and unlearning

Franklin Ohaegbulam frankiefab100

πŸ‘¨β€πŸ’»
Learning, relearning and unlearning
View GitHub Profile
@mmyoji
mmyoji / migrate-npm-to-pnpm.md
Last active October 25, 2025 21:12
Migrate npm to pnpm
// To run this script, you can either:
// 1. Go to sessionize.com in your browser, open the browser console, and paste the following script
// 2. Run it locally in Node.JS and comment the following imports in the begining of the file to use JSDom as a dom parser.
// const jsdom = require("jsdom")
// const { JSDOM } = jsdom
// global.DOMParser = new JSDOM().window.DOMParser
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms))
const now = new Date();
@dabit3
dabit3 / marketplace.sol
Last active April 29, 2025 06:06
NFT Marketplace Smart Contract (V2)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "hardhat/console.sol";
contract NFTMarketplace is ERC721URIStorage {
@akshatamohanty
akshatamohanty / simple-lottery.sol
Last active November 27, 2021 04:18
solidity-saturday-1-simple-lottery
/**
*Submitted for verification at Etherscan.io on 2021-11-26
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
contract Lottery {
uint MAX_PLAYERS = 3;
address manager;
@wojteklu
wojteklu / clean_code.md
Last active November 12, 2025 15:59
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules