Skip to content

Instantly share code, notes, and snippets.

View mranoncoder's full-sized avatar
🤖
I may be slow to respond.

Abolfazl Arab mranoncoder

🤖
I may be slow to respond.
View GitHub Profile
@mranoncoder
mranoncoder / HALLO.ino
Last active April 29, 2026 09:12
HALLO.ino
#include <WiFi.h>
#include <WebServer.h>
#include <PubSubClient.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SH110X.h>
// ================= WLAN =================
const char* ssid = "SCHUL-SUS";
const char* password = "Schule.2021";
@mranoncoder
mranoncoder / server.js
Created November 12, 2023 23:00
Create local host with help of express and ngrok
const express = require('express');
const ngrok = require('ngrok');
const app = express();
const PORT = 3000;
app.use(express.static('public'));
async function startNgrok(port) {
try {
@mranoncoder
mranoncoder / GetAllCollectionHolders.js
Created May 19, 2023 10:30
Get all Token Holder List using Bscscan API
const axios = require('axios');
const apiKey = 'YOUR_BSCSCAN_API_KEY';
const contractAddress = 'YOUR_CONTRACT_ADDRESS';
const apiUrl = `https://api.bscscan.com/api?module=token&action=tokenholderlist&contractaddress=${contractAddress}&apikey=${apiKey}`;
async function getAllHolders() {
try {
const response = await axios.get(apiUrl);
const holders = response.data.result;
@mranoncoder
mranoncoder / StripePayment.js
Created May 16, 2023 11:52
Stripe Payment form Listener
const form = document.querySelector("#payment-form");
form.addEventListener("submit", async (event) => {
event.preventDefault();
const { token, error } = await stripe.createToken("card", {
card: {
number: "4242424242424242",
exp_month: 12,
exp_year: 2024,
cvc: "123",
},
@mranoncoder
mranoncoder / ERC20TestToken.sol
Created May 10, 2023 11:51
Simple ERC20 Token
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
contract MyERC20 is ERC20, ERC20Burnable {
constructor(string memory tokenName, string memory tokenSymbol, uint256 initialSupply) ERC20(tokenName, tokenSymbol) {
_mint(msg.sender, initialSupply * 1 ether);
}
@mranoncoder
mranoncoder / ERC1155BulkSender.sol
Created May 4, 2023 10:38
ERC1155 bulk sender contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
contract ERC1155BulkSender {
/**
* @dev Transfers a batch of ERC1155 tokens to multiple recipients.
* @param contractAddress The address of the ERC1155 token contract.
* @param recipients An array of recipient addresses to send tokens to.
* @param tokenId The ID of the token to send.
* @param amount The amount of tokens to send to each recipient.