Skip to content

Instantly share code, notes, and snippets.

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.24;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Chain is ERC721, Ownable {
uint256 public nextTokenId;
uint256 [] public colors;
constructor() ERC721("ChainNFT", "CHN") {
@nishantrpai
nishantrpai / lichessinfinitetime.md
Created January 22, 2024 07:48
Give infinite time to opponent

The opponent gives you time to act strong, you give him infinite time.

setInterval(() => { document.querySelector('.moretime').click() }, 500)

Show infinite love in the twitter spaces

  1. Join spaces
  2. Go to console

Paste: will run every second, do 5000 for 5s, currently 1s

setInterval(() => {
@nishantrpai
nishantrpai / replay.md
Last active July 15, 2023 07:12
If you want to replay git commits this script can help you. Useful for documentation purposes.
@nishantrpai
nishantrpai / unsub.md
Created July 5, 2023 11:28
How to unsubscribe from all subreddits:
  1. Go to https://www.reddit.com/subreddits/
  2. Go to console

Paste:

Array.from(document.querySelectorAll(`span.fancy-toggle-button.subscribe-button.toggle > a.option.active.remove.login-required`)).forEach((node, i) => setTimeout(() => { node.click(); console.log('leave node'); }, i*500));
@nishantrpai
nishantrpai / capturewallets.md
Last active January 22, 2023 04:02
Capture all ens and wallets from page
  1. Load the entire page
  2. Go to chrome console (menu > more tools > developer tools)
let ens = document.body.innerText.match(/[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)?/g);

let wallets = document.body.innerText.match(/(0x)?[a-fA-F0-9]{40}/g);
@nishantrpai
nishantrpai / bulk-delete-old-tweets.md
Last active March 13, 2023 16:01
Delete old Tweets using Twitter advanced search and console

Bulk Delete Old Tweets

  1. Search your query on twitter advanced search

Example:

image

  1. Open Console: Option + ⌘ + J (on macOS), or Shift + CTRL + J (on Windows/Linux).
@nishantrpai
nishantrpai / discord-reaction-giveaway.md
Last active September 9, 2022 09:00
Pick a random person from discord reactions for giveaway

Discord Giveaway

If you want to pick a random person from discord reactions to giveaway you can use this:

  1. Click on reaction button > Click on X others

  2. Open Console: Option + ⌘ + J (on macOS), or Shift + CTRL + J (on Windows/Linux).

  3. Paste code below based on your needs.