Skip to content

Instantly share code, notes, and snippets.

View Adophilus's full-sized avatar
💭
Learning 🤓

Uchenna Ofoma Adophilus

💭
Learning 🤓
View GitHub Profile
@Adophilus
Adophilus / console_menu.py
Created May 8, 2022 19:24
A menu handler for console applications implemented using decorators in python3
class ConsoleMenu ():
options = []
question = ""
prompt = "Enter a selection: "
def __init__ (self, question: str, prompt: str = prompt):
self.question = question
self.prompt = prompt
def option (self, option: str):
<html>
<head>
<!-- REDACTED -->
</head>
<body>
<video id="player"></video>
@Adophilus
Adophilus / flip-images.bat
Created June 1, 2022 21:10
batch script to flip all images in a folder
@echo off
setlocal EnableDelayedExpansion
mkdir split
mkdir flip
mkdir join
for %%h in ("*.png") do (
@Adophilus
Adophilus / image-editing-snippets.bat
Last active June 1, 2022 21:11
a list of snippets for manipulating image data
rem ffmpeg
rem flip an image on the x (horizontal axis)
for %%f in (*.png) do ffmpeg -i "%%f" -vf hflip -c:a copy "Flip-%%f"
rem flip an image on the y (vertical axis)
for %%f in (*.png) do ffmpeg -i "%%f" -vf vflip -c:a copy "Flip-%%f"
rem imagemagick
@Adophilus
Adophilus / git-hooks-pre-commit.sh
Created June 11, 2022 21:46
A shell script storing the commands to run before a git commit
#!/data/data/com.termux/files/usr/bin/bash
# NOTE: this file script should be placed at .git/hooks/pre-commit
# for linux users, this script should be made executable using the
# command:
# chmod +x .git/hooks/pre-commit
STAGED_FILES="$(git diff --name-only --staged)"
FILES_TO_LINT=""
EXCLUDED_FILES=".gitignore yarn.lock"
@Adophilus
Adophilus / linux-commands-cheatsheet.sh
Last active July 16, 2022 10:36
My Linux Commands Cheatsheet
#! /usr/bin/env bash
# compresses a file/folder to a tape archive (.tar) file
tar -cvf <compressed-name>.tar <file/folder-to-compress>
# decompresses a tape archive (.tar) file to a file/folder
tar -xvf <compressed-name>.tar <file/folder-to-decompress>
# uploads a file to a remote ssh host
scp <local-file> <remote-ssh-host>
@Adophilus
Adophilus / post-receive.sh
Last active September 29, 2022 11:45
A git hook for processing npm projects uploaded to live server using git
#! /usr/bin/env bash
source "~/.bashrc"
PROJECT_NAME="changenow-store"
DEPLOYMENT_PATH="~/tools/express-server/apps/$PROJECT_NAME"
BRANCH="main"
function initNodeApp () {
local folderExisted=$1

Meeting With Evans Precious

Chat Feature

  • help customers interact with clients
  • chat deletes after 24 hrs

Logic of operation

Sending messages

{
"data": [
{
"id": "prod_kpnNwAyOzZwmXB",
"created": 1638621569,
"updated": 1677444253,
"active": true,
"permalink": "essential-vitamins",
"name": "Essential Vitamins",
"description": "<p>Boost your immune system and protect your body against infections.</p><p></p><p>Contains </p><ul><li><p>Multivitamins</p><ul><li><p>Vitamin C</p></li><li><p>Vitamin D</p></li><li><p>Vitamin E</p></li></ul></li><li><p>Zinc</p></li></ul>",
@Adophilus
Adophilus / automasters-wheels-and-services.md
Last active March 28, 2023 19:14
A document storing the summary of the project details for Automasterz Wheels & Services

Automasterz Wheels & Services

Details

  • automobile company
  • focuses and sales and repairs of automobile parts

Requirements

  • online presence (website)
  • platform where customers can order for automobile parts