Skip to content

Instantly share code, notes, and snippets.

View EmekaManuel's full-sized avatar
🏠
Working from home

Onyewuchi Emmanuel EmekaManuel

🏠
Working from home
View GitHub Profile
@EmekaManuel
EmekaManuel / .deps...npm...@openzeppelin...contracts...token...ERC20...ERC20.sol
Created April 21, 2023 06:46
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";
/**
@EmekaManuel
EmekaManuel / [email protected]
Created April 23, 2023 08:08
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.9+commit.e5eed63a.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
@EmekaManuel
EmekaManuel / ArbSui.sol
Created May 6, 2023 10:10
This is a Github Gist for ARB SUI. An ERC-20 token deployed on Arbitrum Network
/**
*Submitted for verification at Arbiscan on 2023-02-22
*/
// TWITTER: https://twitter.com/ARBSUI
// Telegram: https://t.me/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.5;
@EmekaManuel
EmekaManuel / minheap.java
Last active July 17, 2023 07:29
Assignment For Cos 232
import java.util.*
// Name: Nwangwu Chibuikem John-Sinclair
// Reg Number: 2020/247006
// Department: Computer Science (200 level)
public class MinHeap {
private int[] data;
private int size;
private int maxSize;
@EmekaManuel
EmekaManuel / Advanced Typescript Axios Interceptor with [JWT] Authentication, Error Handling, Retry Mechanism and API request helper methods
Last active March 14, 2025 09:19
Advanced Typescript Axios Interceptor with [JWT] Authentication, Error Handling, Retry Mechanism and API request helper methods : This TypeScript-based API wrapper extends Axios to handle authentication, token expiration, request retries, and network monitoring. It includes: JWT Authentication: Token decoding, expiration checks, and automatic lo…
/* eslint-disable @typescript-eslint/no-explicit-any */
import axios, { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
import { jwtDecode } from 'jwt-decode';
// Define interfaces
interface DecodedToken {
roles: string[];
sub: string; // email
iat: number; // issued at timestamp
exp: number; // expiry timestamp