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.
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' |
| 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.
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
| ; ****************************************************************************** | |
| ; * 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: |
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 | |
| # 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: |
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 | |
| # Update Ubuntu Packages | |
| sudo apt update | |
| sudo apt upgrade -y | |
| # Install OpenSSH Server | |
| sudo apt install openssh-server -y | |
| # Start and Enable SSH Service |
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
| # 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 |
NewerOlder