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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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. | |
| * | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Simple LAMP + Composer installer for Ubuntu/Debian | |
| set -e | |
| echo "Starting LAMP + Composer installation..." | |
| # Update system | |
| echo "Updating package list..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| # ========================= | |
| # Colors | |
| # ========================= | |
| GREEN='\033[0;32m' | |
| YELLOW='\033[1;33m' | |
| NC='\033[0m' |
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.
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| 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(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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: |
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.
Make sure you have composer, docker, and docker-compose installed on your system.
NewerOlder