Skip to content

Instantly share code, notes, and snippets.

View rotexdegba's full-sized avatar

Rotimi Ade rotexdegba

View GitHub Profile
@rotexdegba
rotexdegba / python-for-beginners-with-hands-on-projects.md
Last active October 6, 2026 15:34
Python for Beginners with Hands-On Projects by FreeCodeCamp.org 2026
@rotexdegba
rotexdegba / learn-python-interactive-course-2026-freecode-camp-dot-org.md
Created October 4, 2026 01:49
Notes from Learn Python – Interactive Course 2026 by FreeCodeCamp.org
@rotexdegba
rotexdegba / docker-tutorials.md
Created February 9, 2026 23:59
Docker Tutorials

Docker Installation

  • Docker for Rocky Linux 10
    • Update your system and install necessary utilities:
      • sudo dnf update -y
      • sudo dnf install dnf-plugins-core -y
    • Add the official Docker repository:
      • sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    • Install Docker Engine, CLI, containerd, and Compose:
      • sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
  • Start and enable the Docker service:
@rotexdegba
rotexdegba / update-cent-os-7-repos-to-vault-ones.sh
Created June 22, 2025 01:46
Update Cent OS 7 Repos To the Vault Ones POST CENT OS 7 EOL
#!/bin/bash
cd /etc/yum.repos.d
sudo mkdir original_repos
sudo cp -v *.repo original_repos
sudo sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sudo sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
sudo sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
sudo yum clean all
@rotexdegba
rotexdegba / podman-tutorial.md
Created February 26, 2024 20:34
Podman Tutorial

Podman Tutorials


@rotexdegba
rotexdegba / rmdirRecursive.php
Created January 28, 2023 23:15
Recursive Directory Deletion PHP
<?php
function rmdirRecursive(string $dir) {
$iter = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);
$it = new RecursiveIteratorIterator($iter, RecursiveIteratorIterator::CHILD_FIRST);
foreach($it as $file) {
if ($file->isDir()) {
@rotexdegba
rotexdegba / remove-old-snaps.sh
Created January 28, 2023 03:36
Remove old snap apps from any linux distro with snapd enabled
#!/bin/bash
#Removes old revisions of snaps
#CLOSE ALL SNAPS BEFORE RUNNING THIS
set -eu
LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
snap remove "$snapname" --revision="$revision"
done
@rotexdegba
rotexdegba / div-with-multiple-background-images.js
Last active August 24, 2022 20:13
Use JQuery to enable multiple background images for a div with the images being displayed at a specified interval
// Tested with jQuery v3.3.1
$( document ).ready(function() {
var doVisualUpdates = true;
document.addEventListener('visibilitychange', function(){
doVisualUpdates = !document.hidden;
});
// code below changes the background every 10 seconds for the div with id back-overlay-slider
@rotexdegba
rotexdegba / dev-server-router.php
Created February 1, 2021 17:05
Router script for the builtin PHP webserver to handle urls ending in dot something
<?php
// This script is intended to fix the php built-in server issue with urls that
// contain a .something at the end. The built-in server tries to always treat
// such urls as static assets when sometimes they are routes meant to be
// forwarded to the index.php. See below for more info:
//
// https://bugs.php.net/bug.php?id=61286
// https://github.com/slimphp/Slim/issues/359
// https://gonzalo123.com/2012/10/15/how-to-rewrite-urls-with-php-5-4s-built-in-web-server/
// https://gist.github.com/aenglander/8e2f83c4526fccdcdead