Skip to content

Instantly share code, notes, and snippets.

View IdrisAkintobi's full-sized avatar
💻
Developing...

Idris Akintobi IdrisAkintobi

💻
Developing...
View GitHub Profile
### Keybase proof
I hereby claim:
* I am esmart234 on github.
* I am esmart234 (https://keybase.io/esmart234) on keybase.
* I have a public key ASBfPrX-17v6VRGN1M0jX2z_LjULOBy-heQRxwSuG57Clgo
To claim this, I am signing this object:
@IdrisAkintobi
IdrisAkintobi / StudentPortal.sol
Last active August 27, 2024 16:39
A smart contract to register Students
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.26;
contract StudentPortal {
address private owner;
struct Student {
string name;
string email;
string dob;
@IdrisAkintobi
IdrisAkintobi / CallSendTransfer.sol
Created August 31, 2024 01:52
This Solidity code demonstrates three methods—`transfer`, `send`, and `call`—for transferring Ether between contracts.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
import "hardhat/console.sol";
/*
* Summary:
* This Solidity code demonstrates three methods—`transfer`, `send`, and `call`—for transferring Ether between contracts.
* - `Transfer` uses `transfer`, which forwards a fixed gas amount of 2300 units and reverts if the receiving contract consumes more gas.
* - `Send` uses `send`, which also forwards 2300 gas units but returns a boolean indicating success or failure without reverting.
* - `Call` uses `call`, allowing the sender to specify a custom gas amount, making it suitable for contracts that require more gas to execute.
@IdrisAkintobi
IdrisAkintobi / Muiltisig_Classwork.sol
Created September 11, 2024 08:43
A multisig contract example.
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.24;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract Multisig {
uint8 public quorum;
uint8 public noOfValidSigners;
uint256 public txCount;
uint8 public newQuorum;
uint8 private newQuorumSignerCount;
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;
import {Script, console2} from "forge-std/Script.sol";
interface IFC {
function register(string memory name) external returns (address);
function Complete(address token_) external returns (bool);
}
@IdrisAkintobi
IdrisAkintobi / Dockerfile
Last active March 26, 2025 10:56
Redis-Docker
# Use the official Redis image from the Docker Hub
FROM redis:7.4
# Copy the custom Redis configuration file
COPY redis.conf /usr/local/etc/redis/redis.conf
# Expose the default Redis port
EXPOSE 6379
# Start Redis server with the custom configuration
@IdrisAkintobi
IdrisAkintobi / README.md
Created March 24, 2025 13:29
Install VS Code on Manjaro

Visual Studio Code (VSCode) Manual Installation on Manjaro

This guide provides step-by-step instructions on how to manually install Visual Studio Code (VSCode) on a Manjaro Linux system, including how to extract the tarball, rename the folder, move it to a proper directory, create a desktop entry, and set up an icon.

Installation Instructions

1. Download VSCode

First, visit the official VSCode download page and download the tar.gz version for Linux (e.g., code-stable-x64-.tar.gz).

@IdrisAkintobi
IdrisAkintobi / Dockerfile
Last active April 1, 2025 07:47
Postgres-Docker
# Use the official PostgreSQL image from the Docker Hub
FROM postgres:17.4
# Create the WAL archive directory and set permissions
RUN mkdir -p /mnt/server/archivedir && chown postgres:postgres /mnt/server/archivedir
# Copy the custom PostgreSQL configuration file (optional)
COPY postgres.conf /usr/share/postgresql/postgresql.conf.sample
# Expose the default PostgreSQL port
@IdrisAkintobi
IdrisAkintobi / Makefile
Created March 26, 2025 10:48
Mongo-Docker - Single replica instance
# Load environment variables from .env
include .env
export $(shell sed 's/=.*//' .env)
# Variables
CONTAINER_NAME = mongo-container
# Build the Docker images (optional, as you're using a pre-built image)
build:
docker compose up --build -d
@IdrisAkintobi
IdrisAkintobi / README.md
Created April 3, 2025 16:22
SetUp Oh My Zsh and PowerLevel10k

Oh-My-ZSH Installation and Configuration

This README provides step-by-step instructions for installing and configuring Oh-My-ZSH with PowerLevel10k theme and useful plugins for a better terminal experience.

Prerequisites

Ensure that you have zsh and git installed on your system before proceeding with the installation.

  • For Ubuntu, use: sudo apt install zsh git