Skip to content

Instantly share code, notes, and snippets.

View adeisbright's full-sized avatar

Adeleke Bright adeisbright

View GitHub Profile
@adeisbright
adeisbright / get-auth-token.ts
Last active May 9, 2026 13:03
An example on how to handle thunder herd problem
import Redis from "ioredis";
interface TokenResponse {
token: string;
expires_in: string;
}
interface AuthClientConfig {
url: string;
authPayload: Record<string, unknown>;
@adeisbright
adeisbright / getting-started.md
Last active March 9, 2025 15:38
Learning Rust:Lesson 1

Installation

To install Rust, copy and paste this to your terminal curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

After running this command, you need to add Rust env to your $HOME using :

source "$HOME/.cargo/env"

Your First Project

@adeisbright
adeisbright / send-message-with-termii.js
Created January 17, 2025 08:26
An example on how to use termii for delivering sms
const sendTokenWithTermii = async (message) => {
const data = {
"api_key" : Config.termiiToken,
"message_type" : "NUMERIC",
"to" : "+2348140850141",
"from" : "Bigjara",
"channel" : "dnd",
"pin_attempts" : 10,
"pin_time_to_live" : 5,
"pin_length" : 4,
@adeisbright
adeisbright / food-and-population-control.md
Last active January 12, 2025 11:53
Problem solving mindset and implementing with python

Food Scarcity, Food Distribution, and Population Control

A hypothetical community is facing issues with food scarcity .

In a given day, people within the community will be complaining about lack of food because available food is depleted quickly

Another reason for this issue is absence of planning .

The community managers do not know the total number of people in the community.

@adeisbright
adeisbright / turftribe.md
Last active January 24, 2025 07:06
Turftribe : Outdoor Sporting Discovery and Management Platform .
We couldn’t find that file to show.
#The instructions in this file will be used by docker to build an image
FROM node:16-alpine
RUN echo 'I am testing out working with dockerfile'
WORKDIR /app
COPY package*.json ./
COPY . .
RUN npm install
EXPOSE 3800
CMD ["node" , "dist/src/index.js"]
@adeisbright
adeisbright / Flask-lessons.md
Last active April 3, 2022 20:06
Learning Flask
@adeisbright
adeisbright / Virtual Environment in Python
Last active October 5, 2023 09:13
Setting up virtual environments in Python
When building applications using any programming language, we sometimes use codes provided by the programming community.
In Python, without an isolated environment newer version of a particular package will replace older ones and this will in turn
lead to breaking changes for the project that depends on the older package.
To handle this problem, Python provides us a tool(venv) to create an isolated environment for our project dependencies.
When we install a package, we do not want it to be installed on the global path for site packages; we want that package to be
isolated and constrained to the application that needs it.
@adeisbright
adeisbright / server-side.md
Created March 13, 2022 04:49
Server Side Programming

Programming Servers

I know the term "server" is popular.

Some of us write programs that are termed "Server Side Programs"

Writing server side codes in any language follows the same guideline that I will outline here

@adeisbright
adeisbright / react-todolist-project.md
Created February 21, 2022 06:57
Creating a task manager

React Todolist Project

This project is a task management project that covers essential react features such as:

  1. State Management
  2. Uncontrolled Component
  3. Component Life Cycle
  4. Routing
  5. etc

The Lessons should be followed as presented below: