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
/**
*Submitted for verification at Etherscan.io on 2021-09-05
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// [MIT License]
/// @title Base64
@farzaa
farzaa / MyEpicNFT.sol
Last active December 27, 2022 18:23
End of Section #1 Code
pragma solidity 0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "hardhat/console.sol";
contract MyEpicNFT is ERC721URIStorage {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
@adilanchian
adilanchian / App.js
Last active March 6, 2023 09:37
Section 4: Update WavePortal to randomly send lucky users waving at you some Ethereum
import React, { useEffect, useState } from "react";
import { ethers } from "ethers";
import './App.css';
import wavePortal from './utils/WavePortal.json';
const App = () => {
const [currentAccount, setCurrentAccount] = useState("");
const [allWaves, setAllWaves] = useState([]);
const contractAddress = "0xd5f08a0ae197482FA808cE84E00E97d940dBD26E";
@Purpzie
Purpzie / update-lockfile.yml
Last active May 6, 2023 13:22
Action to update pnpm-lock.yaml when Dependabot opens a PR. Be warned that this may cause lots of merge conflicts.
# https://github.com/dependabot/dependabot-core/issues/1736
name: Dependabot
on: pull_request_target
permissions: read-all
jobs:
update-lockfile:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
permissions:
pull-requests: write
@privatenumber
privatenumber / light-dark-image.svg
Last active December 14, 2022 19:58
Light/dark mode SVG image
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bvaughn
bvaughn / devtools-bridge-protocol.md
Last active October 13, 2022 18:34
React DevTools: Unsupported backend version

Unsupported DevTools backend version

This page contains instructions for updating a local React DevTools application to match a version embedded in a renderer such as React Native. Instructions below cover NPM, Flipper, and React Native Debugger. If you use React DevTools in a different way, please let us know.

If you are viewing this page, you have likely seen one of the dialogs below:

Dialog displaying downgrade instructions for the React DevTools frontend to connect to an older backend version

import { appRoutes } from "../constants";
import { useAuthContext } from "../contexts";
//check if you are on the client (browser) or server
const isBrowser = () => typeof window !== "undefined";
const ProtectedRoute = ({ router, children }) => {
//Identify authenticated user
const { user } = useAuthContext();
const isAuthenticated = user.isLoggedIn;
@TheCedarPrince
TheCedarPrince / .zshrc
Created October 26, 2020 16:10
My zsh Configuration File
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
clear && neofetch
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="spaceship"
@TheCedarPrince
TheCedarPrince / init.vim
Last active November 17, 2022 09:28
My (neo)Vim Configuration File
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" VIM SETTINGS
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" TURNS LINE NUMBERING ON
set nu
" TRIGGER `autoread` WHEN FILES CHANGES ON DISK
set autoread
autocmd FocusGained,BufEnter,CursorHold,CursorHoldI * if mode() != 'c' | checktime | endif
@olets
olets / zsh-plugin-manager-plugin-installation-procedures.md
Last active March 26, 2024 07:04
zsh plugin manager cross-reference

Instructions for installing zsh plugins, for a variety of plugin managers

  • antibody: Add <owner>/<repo> to your plugins file. If you use static loading update the sh.

  • Antigen: Add antigen bundle <owner>/<repo> to your .zshrc.

  • Oh-My-Zsh:

    • Clone to OMZ's plugins' directory: