Skip to content

Instantly share code, notes, and snippets.

View devinci-it's full-sized avatar
🐢

.vince devinci-it

🐢
View GitHub Profile
@devinci-it
devinci-it / windows-oem-key.sh
Created September 6, 2026 18:18
Windows OEM Product Key Extractor
#!/usr/bin/env bash
#
# windows-oem-key.sh
#
# Extract a Windows OEM product key from:
# 1. UEFI/ACPI MSDM table (preferred; works with no OS installed)
# 2. An installed Windows registry hive (offline Windows)
#
# Usage:
# sudo ./windows-oem-key.sh
@devinci-it
devinci-it / GateKeeper.php
Created May 11, 2026 11:12
A fluent, chainable authorization gate for PHP applications. Control access to resources based on session data, roles, and custom conditions with both redirect and JSON response handling.
<?php
/**
* GateKeeper - Authorization and Access Control Handler
*
* A fluent authorization gate for controlling access to resources based on
* session data, custom roles, and arbitrary conditions. Supports both HTTP
* redirects and JSON responses for denial handling.
*
*

Deployment Guide: Per-Domain Apache Hosting Structure

Overview

This guide defines a standardized, isolated deployment model for hosting multiple domains on a single server. Each domain is treated as an independent unit with clearly separated web content, logs, cache, and persistent storage.


Core Principle

@devinci-it
devinci-it / lampstack-install.sh
Created March 12, 2026 09:26
Simple LAMP + Composer installer for Ubuntu/Debian
#!/bin/bash
# Simple LAMP + Composer installer for Ubuntu/Debian
set -e
echo "Starting LAMP + Composer installation..."
# Update system
echo "Updating package list..."
@devinci-it
devinci-it / pipenv-init.sh
Created February 3, 2026 01:39
This setup script automates the initialization of a Python project using pipenv. It installs and upgrades the pipenv environment, adds essential development dependencies like build and wheel, and creates a Makefile with convenient targets to build source and wheel distributions. The script also initializes a git repository, also adding, .gitigno…
#!/usr/bin/env bash
set -e
# =========================
# Colors
# =========================
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
@devinci-it
devinci-it / guide.md
Last active August 2, 2024 17:55
Installation guide for `thefuck` using `pyenv`

Guide to Installing thefuck with pyenv

Overview

This guide will help you install and configure thefuck using pyenv in the /opt/thefuck directory. By following these steps, you'll set up pyenv, install Python 3.11, create and manage a virtual environment, and ensure the correct executable for thefuck.

Table of Contents

  1. Install pyenv and Python 3.11
@devinci-it
devinci-it / python_dt.md
Created July 18, 2024 17:22
Date-Time Format Codes Table
Format Code Description Example Use in strptime/strftime
%Y Year with century (4 digits) 2024 strptime/strftime
%y Year without century (2 digits) 24 strptime/strftime
%m Month as a zero-padded decimal number 07 (for July) strptime/strftime
%B Full month name July strptime/strftime
%b Abbreviated month name Jul strptime/strftime
%d Day of the month as a zero-padded number 18 strptime/strftime
@devinci-it
devinci-it / hello_world.py
Created June 23, 2024 12:06
CS87C Summer 2024 - SMC This Gist repository contains source code compiled for CS87C Summer 2024 at Santa Monica College (SMC). It includes assignments, projects, and exercises related to the course. Course Details: - Course: CS87C - Term: Summer 2024 - Institution: Santa Monica College (SMC) - Course Code: CS 87A (1616) - Title: Python Programm…
"""
filename: hello_world.py
This script demonstrates printing "HELLO WORLD!" with styled formatting using ANSI escape codes.
Vincent de Torres
CS87A-Summer 2024 | Check-In Homework
"""
def hello():
@devinci-it
devinci-it / chroot_assist.sh
Created June 10, 2024 02:00
This script automates the process of entering a chroot environment.
#!/bin/bash
: '
Interactive Chroot Script
This script automates the process of entering a chroot environment. It lists available disks and partitions,
prompts the user to select a partition, mounts the necessary filesystems, and enters the chroot environment.
The script also provides a command (`exit-chroot`) to trigger the unmounting of filesystems and exit the script.
Functions:

Quick Setup: Laravel with Docker

Step 1: Create Laravel Project with Docker

To set up a new Laravel project with Docker, you can use the following script. This will create a new Laravel project, set up Docker with a Dockerfile and docker-compose.yaml, and configure the .env file with MySQL settings.

Prerequisites

Make sure you have composer, docker, and docker-compose installed on your system.