Skip to content

Instantly share code, notes, and snippets.

View officialmofabs's full-sized avatar
💭
building safe spaces

Moses Fabiyi officialmofabs

💭
building safe spaces
View GitHub Profile
@officialmofabs
officialmofabs / local-registry.md
Created August 18, 2025 14:56 — forked from trisberg/local-registry.md
Using a Local Registry with Minikube

Using a Local Registry with Minikube

Install a local Registry

These instructions include running a local registry accessible from Kubernetes as well as from the host development machine at registry.dev.svc.cluster.local:5000.

  1. Use the docker CLI to run the registry:2 container from Docker, listening on port 5000, and persisting images in the ~/.registry/storage directory.
@officialmofabs
officialmofabs / docs.md
Created August 16, 2025 23:55 — forked from kaigouthro/docs.md
Install Docker to Mounted Drive

A Bash script for Debian/Ubuntu-based systems that will install Docker (if not already installed) and configure it to use a specified directory (presumably on your mounted external drive) for storing containers, images, volumes, etc.

Important Considerations BEFORE Running:

  1. External Drive MUST be Mounted: This script assumes your external drive is already mounted before you run the script. It does not handle mounting the drive itself.
  2. Persistent Mount: For Docker to start correctly after a reboot, the external drive must be mounted persistently (e.g., via an entry in /etc/fstab) at the same path every time.
  3. Backup: If you have existing Docker data in /var/lib/docker and it's important, BACK IT UP before running this script. The script attempts to move existing data, but failures can happen.
  4. Root Privileges: You need to run this script with sudo.
  5. Distribution: This script is tailored for Debian/Ubuntu. The package manager (apt), repository s

Start a dev server

Serve a local directory of static assets - using one-line solutions and no scripts

The first solution uses an IDE extension, while the rest involve using the command-line (intended for macOS and Linux, but they will hopefully work on Windows too).

Table of contents

@officialmofabs
officialmofabs / server.conf
Created August 11, 2025 05:06 — forked from timcheadle/server.conf
SSL nginx config example
server {
listen 80;
server_name www.example.com example.com;
# Redirect all traffic to SSL
rewrite ^ https://$host$request_uri? permanent;
}
server {
listen 443 ssl default_server;
@officialmofabs
officialmofabs / Instructions.md
Created August 1, 2025 05:43 — forked from lbssousa/Instructions.md
VSCode + Dev Containers and Toolbx/Distrobox setup for Fedora Silverblue

VSCode + Dev Containers and Toolbx/Distrobox setup for Fedora Silverblue

PLEASE NOTE:

I personally don't use Flatpak VSCode anymore, since I switched from Fedora Silverblue to Universal Blue's project Bluefin-DX. I'll leave the instructions here for those who want them, but be aware that Flatpak VSCode instructions won't be maintained anymore.

Steps

If you prefer VSCode Flatpak

  1. Install VSCode Flatpak from Flathub:
@officialmofabs
officialmofabs / sshrc
Created August 1, 2025 01:09 — forked from dzhurinskij/sshrc
/etc/ssh/sshrc example
#!/bin/bash
ip=`echo $SSH_CONNECTION | cut -d " " -f 1`
hostname=`hostname`
fqdn=`hostname -f`
logger -t ssh-wrapper $USER login from $ip
sendmail -t <<EOF
To: Alex <[email protected]>
@officialmofabs
officialmofabs / .gitignore
Created July 31, 2025 23:01 — forked from jameswilson/.gitignore
Configure DDEV for AWS CLI, and use an EC2 instance as a jumphost
# Add the following to your project's .gitignore
# The approach here assumes you're going to want to have the awscli also configured
# on your host OS, so we can just copy configs from ~/.aws/ on your host OS into the
# ddev web container during startup by way of the .ddev/homeadditions folder.
.ddev/homeadditions/.aws
@officialmofabs
officialmofabs / README.md
Created July 30, 2025 14:45 — forked from felipepodesta/README.md
Ubuntu Development Environment Setup Script

Ubuntu Dev Setup Script

I tend to setup and teardown my dev environments quite frequently. So I have created this setup.sh script to automate setting up the dev environment with my preferences.

This script -

  • Installs curl, git, net-tools, and tree.
  • Installs build-essential package which installs gcc, g++ and some other libs.
  • Installs the latest openjdk and maven.
  • Installs python3 and some required libraries (I use them pretty often).
  • Installs nodejs 12 globally. Then installs Node Version Manager and installs all LTS versions.
@officialmofabs
officialmofabs / download_vscode_server.sh
Created July 27, 2025 07:14 — forked from cvcore/download_vscode_server.sh
Manual download vscode-server
#!/bin/bash
# This script downloads and installs a specific version of VSCode Server for Linux.
# The version is specified by the first argument to the script.
# You can find the git commit id in the output of Remote - SSH plugin in VSCode.
# The output looks like this:
# ...
# Using commit id "af28b32d7e553898b2a91af498b1fb666fdebe0c" and quality "stable" for server
# ...