Skip to content

Instantly share code, notes, and snippets.

View thexeromin's full-sized avatar
🎯
Focusing

Abhijit Paul thexeromin

🎯
Focusing
View GitHub Profile
import NextAuth from 'next-auth'
import type { NextAuthOptions } from 'next-auth'
import CredentialsProvider from 'next-auth/providers/credentials'
import axios, { AxiosResponse } from 'axios'
import type { JWT } from 'next-auth/jwt'
import type { User, Session, Account } from 'next-auth'
interface AuthResponse {
id: string
@thexeromin
thexeromin / raylib_basic_template.c
Created January 29, 2024 13:52
Basic raylib game template
#include "raylib.h"
// Some Defines
#define PLAYER_MAX_LIFE 5
// Types and Structures
typedef struct Player {
Vector2 position;
Vector2 size;
int life;
@thexeromin
thexeromin / SDL_GAME_LOOP.c
Created January 24, 2024 12:09
Basic template sdl2
#include <stdio.h>
#include <SDL2/SDL.h>
#define FALSE 0
#define TRUE 1
#define WINDOW_WIDTH 800
#define WINDOW_HEIGHT 600
#define FPS 30
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC20/ERC20.sol';
contract Ownable {
mapping(address => bool) public owner;
event AddedOwner(address newOwner);
event RemovedOwner(address removedOwner);
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC20/ERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
contract Pepe is ERC20, Ownable {
uint256 private constant INITIAL_SUPPLY = 4 * 10**9 * 10**18;
// Addresses of tax recipients
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
interface IDEXRouter {
import { SHA256 } from "crypto-js";
const createHash = (str1, str2) => {
let arr1 = [str1, str2];
const sortAlphaNum = (a, b) => a.localeCompare(b, "en", { numeric: true });
const arrayOutput = arr1.sort(sortAlphaNum);
const hash = SHA256(arrayOutput.join("")).toString();
return hash;
};
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract BridgeBSC is Ownable {
using SafeMath for uint256;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract BridgeBSC is Ownable {
using SafeMath for uint256;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract Bridge is Ownable {
using SafeMath for uint256;
address public tokenReceiver = 0x7604cC735Baaf33283dc4f3372A7B4A14B93Ce10;