Skip to content

Instantly share code, notes, and snippets.

View nekofar's full-sized avatar
💭
I may be slow to respond.

Milad Nekofar nekofar

💭
I may be slow to respond.
View GitHub Profile
@HashWarlock
HashWarlock / devdao-lensapi-oracle-workshop-resources.md
Last active August 22, 2023 20:51
DeveloperDAO LensAPI Oracle Workshop Resources
@christiangenco
christiangenco / migrateHeroicons.js
Last active September 5, 2024 07:59 — forked from PicchiKevin/migrate.sh
Heroicons v1 to v2
const fs = require("fs");
if (!fs.existsSync("package.json")) {
console.error(
"Cannot find package.json. Please run this script in your project directory."
);
process.exit(1);
}
const package = fs.readFileSync("package.json", "utf8");
@PicchiKevin
PicchiKevin / migrate.sh
Last active November 16, 2023 11:02
Heroicons v1 to v2
find . -type f -not -path '*/.*' -path '*.js' -not -path './node_modules*' -not -path 'migrate.js' -exec sed -i '' -e 's/AdjustmentsVerticalIcon/AdjustmentsVerticalIcon/g' {} +
find . -type f -not -path '*/.*' -path '*.js' -not -path './node_modules*' -not -path 'migrate.js' -exec sed -i '' -e 's/ChatBubbleBottomCenterTextIcon/ChatBubbleBottomCenterTextIcon/g' {} +
find . -type f -not -path '*/.*' -path '*.js' -not -path './node_modules*' -not -path 'migrate.js' -exec sed -i '' -e 's/ArchiveBoxIcon/ArchiveBoxIcon/g' {} +
find . -type f -not -path '*/.*' -path '*.js' -not -path './node_modules*' -not -path 'migrate.js' -exec sed -i '' -e 's/ArrowDownCircleIcon/ArrowDownCircleIcon/g' {} +
find . -type f -not -path '*/.*' -path '*.js' -not -path './node_modules*' -not -path 'migrate.js' -exec sed -i '' -e 's/ArrowLeftCircleIcon/ArrowLeftCircleIcon/g' {} +
find . -type f -not -path '*/.*' -path '*.js' -not -path './node_modules*' -not -path 'migrate.js' -exec sed -i '' -e 's/ArrowRightCircleIcon/ArrowRightCircleI
@m-ostadi
m-ostadi / regex.txt
Created July 1, 2022 13:43
regex for adding tailwind prefix to existing tailwind classes
in your editor (i used phpstorm ctrl+shift+f for find and replace in all files of a specific folder):
find : (?<=class=["'][^"']*)([0-9a-zA-Z_-]+\s*)(?=[^"']*["'])
replace : tw-$1
@secrethash
secrethash / composer.json
Last active January 13, 2023 02:18
Laravel Helper Function to create a Unique slug based on Provided Model Instance. Save 'slugify_model.php' in your 'app/Helpers/' directory and update your composer.json to reference and autoload the helper function.
{
...
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
},
"files": [
...
@pboling
pboling / BrokenExample.md
Last active October 18, 2024 18:19
Github Markdown Light & Dark Themed Logo SVG

Change your Github Settings > Appearance > Theme (light to dark, or dark to light) and reload this page! You will note that none of these solutions work!

@Suleman-Elahi
Suleman-Elahi / worker.js
Created March 4, 2022 05:17
Sending Free Emails from Cloudflare Workers using MailChannels Send API. You do not need an account with MailChannels in order to start sending email. You also do not have to verify your domain with Cloudflare.
addEventListener("fetch", event => {
event.respondWith(handleRequest(event.request))
})
let body = {};
async function handleRequest(request) {
let content = "just drop if it fails...okay ?";
for( var i of request.headers.entries() ) {
content += i[0] + ": " + i[1] + "\n";
}
let respContent = "";
@parv3213
parv3213 / GnosisInteraction.ts
Created October 13, 2021 11:30
Interact with Gnosis Safe using Gnosis Transaction Service
import { ethers } from 'hardhat';
import Safe, { EthersAdapter } from '@gnosis.pm/safe-core-sdk';
import { SafeTransactionDataPartial } from '@gnosis.pm/safe-core-sdk-types';
import SafeServiceClient, {
SafeInfoResponse,
} from '@gnosis.pm/safe-service-client';
const SUPPORTED_NETWORKS: number[] = [4]; // Array of supported networks
const GNOSIS_SAFE_ADDRESS: string =
'0xF16cAC48d46135247CC2f1e5054d0B2b0f0000AF'; // Address of Gnosis Safe
pragma solidity 0.8.0;
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "hardhat/console.sol";
import { Base64 } from "./libraries/Base64.sol";
import './styles/App.css';
import twitterLogo from './assets/twitter-logo.svg';
import { ethers } from "ethers";
import React, { useEffect, useState } from "react";
import myEpicNft from './utils/MyEpicNFT.json';
const TWITTER_HANDLE = '_buildspace';
const TWITTER_LINK = `https://twitter.com/${TWITTER_HANDLE}`;
const OPENSEA_LINK = '';
const TOTAL_MINT_COUNT = 50;