© 2024 | devinci-it
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
| #!/bin/bash | |
| # update_prompt() - Update the Bash prompt dynamically based on various conditions. | |
| # | |
| # This function dynamically updates the Bash prompt based on the following conditions: | |
| # - Git status: Indicates if there are changes in the Git repository. | |
| # - Python project: Displays "PY" if the current directory contains requirements.txt or Pipfile. | |
| # - PHP project: Displays "PHP" if the current directory contains index.php. | |
| # - Composer.json presence: Displays symbol ∬ if composer.json is present in the directory. | |
| # - Presence of .env, venv, pipfile, or req.txt files: Displays symbol ≓ if any of these files are present. |
© 2024 | devinci-it
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
| from .writer import write_file_with_prompt as write_cautious | |
| from .banner import print_banner as banner | |
| from .file_utils import copy_file_with_prompt as copy |
This Gist contains .gitignore templates tailored for different types of projects and environments. .gitignore files help ensure that certain files or directories are not tracked by Git, which can be useful for ignoring build artifacts, editor-specific files, and other generated files.
Choose a Template: Browse through the available .gitignore templates in this Gist and select the one that best matches your project's requirements.
Copy the Content: Open the chosen .gitignore file and copy its content.
| # Ubuntu Main Repositories | |
| deb http://archive.ubuntu.com/ubuntu/ mantic main restricted | |
| deb http://archive.ubuntu.com/ubuntu/ mantic-updates main restricted | |
| deb http://security.ubuntu.com/ubuntu/ mantic-security main restricted | |
| # Ubuntu Universe Repositories | |
| deb http://archive.ubuntu.com/ubuntu/ mantic universe | |
| deb http://archive.ubuntu.com/ubuntu/ mantic-updates universe | |
| deb http://security.ubuntu.com/ubuntu/ mantic-security universe |
| #!/bin/bash | |
| # Update Ubuntu Packages | |
| sudo apt update | |
| sudo apt upgrade -y | |
| # Install OpenSSH Server | |
| sudo apt install openssh-server -y | |
| # Start and Enable SSH Service |
| #!/bin/bash | |
| # This script installs and configures XRDP with XFCE on a Debian system. | |
| # | |
| # It performs the following steps: | |
| # 1. Updates the system packages. | |
| # 2. Installs XRDP. | |
| # 3. Installs the XFCE desktop environment. | |
| # 4. Configures XRDP to use XFCE by creating a .xsession file in the home directory. | |
| # 5. Checks if the XRDP_PORT environment variable is set: |
| ; ****************************************************************************** | |
| ; * Dockerfile for PHP Laravel Development Environment | |
| ; * | |
| ; * This Dockerfile creates a development environment for PHP Laravel projects. | |
| ; * It includes PHP 8.3, Composer, Node.js with npm, and Laravel Installer. | |
| ; * | |
| ; * Arguments: | |
| ; * - PROJECT_NAME: The name of the project/application. | |
| ; * | |
| ; * Environment Variables: |
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.
| #!/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: |