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 / 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.

@devinci-it
devinci-it / Dockerfile
Created June 2, 2024 02:15
DOCKER file setup and config files for php/laravel local development environement.
; ******************************************************************************
; * 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:
@devinci-it
devinci-it / xrdp.sh
Created May 19, 2024 18:59
This script installs and configures XRDP with XFCE on a Debian system.
#!/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:
@devinci-it
devinci-it / ssh_setup.sh
Created May 18, 2024 22:23
script snippet Script snippet to install OpenSSH server, configure it for key-based authentication, and add a public key for the specified user.
#!/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
@devinci-it
devinci-it / ubuntu_mantic_source_list
Created May 15, 2024 14:24
` sources.list` file for Ubuntu mantic repositories.
# 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