First of all you have to start your xamp server
pip install mysql-connector-python
| # https://support.cloudflare.com/hc/en-us/articles/200170786-Restoring-original-visitor-IPs#C5XWe97z77b3XZV | |
| server { | |
| server_name lecuong.info; | |
| listen *:80; | |
| client_max_body_size 100M; | |
| proxy_read_timeout 600s; | |
| proxy_buffers 16 4k; | |
| proxy_buffer_size 2k; | |
| location ^~ /.well-known/acme-challenge/ { |
| """It may be useful to have one catch-all view where you handle complex logic yourself based on the path. | |
| This example uses two rules: | |
| - First rule specifically catches | |
| - Second rule catches arbitrary paths with the built-in path converter. | |
| The path converter matches any string (including slashes).""" | |
| @app.route('/', defaults={'u_path': ''}) | |
| @app.route('/<path:u_path>') | |
| def catch_all(u_path): | |
| print(repr(u_path)) |
| """ | |
| ** SQLAlchemy with dynamically input: | |
| - table | |
| - db_url | |
| This is creating a factory function to dynamically choose the database URL and table based on input, | |
| dynamically creating the engine and session based on the input, | |
| then dynamically loading the appropriate model. | |
| ** Install packages: | |
| pip install sqlalchemy pymysql |
| #!/usr/bin/env bash | |
| # exit on error | |
| set -o errexit | |
| params_file='params.ini' | |
| #Including .ini file | |
| . $params_file | |
| if [ ! -f $params_file ]; then |
| # Set the username for which to fetch the groups | |
| # Usage: Get-memberOf-User.ps1 <username> | |
| param ( | |
| [string]$username | |
| ) | |
| # If no username is provided, prompt the user for input | |
| if (-not $username) { | |
| Write-Host "Please provide a username as an argument." | |
| exit |
| #!/bin/bash | |
| # Built with ❤️ by Cuongitl (LE VAN CUONG) | |
| # Telegram: https://t.me/Cuongitl | |
| # Filename: install-vnstat.sh | |
| # Modified: 2024-11-11 | |
| # Purpose: Install vnStat - a network traffic monitor for Linux | |
| # Exit the script if any command fails | |
| set -o errexit | |
| # Define the version of vnStat here |
| # Veeam: Powershell get Backup Repository Information: Returns a list of backup repositories. | |
| # Get-VBRBackupRepository | Format-List * | |
| #Get-VBRBackupRepository | | |
| # Select-Object Name, Id, Type, @{Name="Path";Expression={$_.Path.ToString()}}, Description | | |
| # ConvertTo-Json -Depth 3 | |
| Get-VBRBackupRepository | | |
| Select-Object Name, | |
| Id, | |
| @{Name="Type"; Expression={ |
| # Veeam: Powershell get Backup Repository Information: Returns a list of backup repositories. | |
| # version 02 | |
| # Define the function | |
| function Get-VBRBackupRepositoryDetails { | |
| $Repos = Get-VBRBackupRepository | |
| $RepoDetails = foreach ($repo in $Repos) { | |
| [PSCustomObject]@{ | |
| 'Name' = $repo.Name | |
| 'ID' = $repo.ID |