Skip to content

Instantly share code, notes, and snippets.

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

Idris Akintobi IdrisAkintobi

💻
Developing...
View GitHub Profile
@IdrisAkintobi
IdrisAkintobi / take-memory-snapshot.ts
Last active April 17, 2025 19:21 — forked from amirilovic/take-memory-snapshot.ts
A script that save heap snapshot from a nodejs process in debug mode to a file
import fs from "fs";
import { WebSocket } from "ws";
async function getWebSocketDebuggerUrl() {
const res = await fetch("http://localhost:9229/json");
const data = await res.json();
return data[0].webSocketDebuggerUrl;
}
let ws: WebSocket;
@IdrisAkintobi
IdrisAkintobi / Dockerfile
Last active April 5, 2025 22:18
Elasticsearch-Docker
# Use the official Elasticsearch image from Docker Hub
FROM docker.elastic.co/elasticsearch/elasticsearch:8.17.2
# Copy the custom elasticsearch.yml into the container
COPY ./elasticsearch.yml /usr/share/elasticsearch/config/elasticsearch.yml
# Expose Elasticsearch port
EXPOSE 9200
# Run Elasticsearch
@IdrisAkintobi
IdrisAkintobi / README.md
Created April 3, 2025 17:12
FiraCodeiScript for Italic Fonts in VSCode

Setup FiraCodeiScript for Italic Fonts in VSCode

Enhance your coding experience in Visual Studio Code by using FiraCodeiScript, a font that adds elegant italic styles to your code.

What is FiraCodeiScript?

FiraCodeiScript is a variant of the FiraCode font that introduces script-style italics for certain code elements, making your code more visually appealing.

How to Install FiraCodeiScript

@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
@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 / 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 / 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 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
// 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 / 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;