To public service port over the Internet, we can use ngrok This guide give you steps to do the follow things below:
- Install ngrok
- Create a config file named ngrok.yml
- Allow user auto login
- Create crontab send telegram URL login every @reboot action
| @echo off | |
| :: Define color codes | |
| set "RED=0c" | |
| set "YELLOW=0e" | |
| set "GREEN=0a" | |
| set "DEFAULT=07" | |
| :: Call setColor label to print text in different colors | |
| call :setColor "This is a red message" RED | |
| echo. |
| # Fork from https://gist.githubusercontent.com/msanjeevkumar/edbfebbae976ab7b2cb2e4f22cb6b374/raw/005490f3c968b68645bb649612cb5303fdd4a48e/cursor_setup_and_update.sh | |
| #!/bin/bash | |
| set -euo pipefail | |
| # Directory setup | |
| APP_DIR="${HOME}/Applications" | |
| ICON_DIR="${HOME}/.local/share/icons" | |
| DESKTOP_DIR="${HOME}/.local/share/applications" | |
| BIN_DIR="${HOME}/.local/bin" |
| @echo off | |
| :: Ask the user for the new location to save Zalo | |
| SET /P "destination=Enter the new location for Zalo (e.g., D:\NewFolder\Zalo): " | |
| :: Define the old location of the Zalo application | |
| SET "source=%USERPROFILE%\AppData\Local\Zalo" | |
| :: Check if the new directory exists, if not, create it | |
| IF NOT EXIST "%destination%" ( |
| $path = Read-Host -Prompt "Please enter the file system path to your docx files." | |
| # Create Word application object | |
| $msWord = New-Object -ComObject Word.Application | |
| # Ensure the Word application runs in the background | |
| $msWord.Visible = $false | |
| # Process each docx file in the specified directory | |
| Get-ChildItem -Path "$path" -Filter *.doc? -ErrorAction Stop | ForEach-Object { |
| :: "VERSION=1.4" | |
| :: "CREATED_DATE=2024-08-31" | |
| @echo off | |
| Title Automated Driver Backup and Restore Script | |
| >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" | |
| if '%errorlevel%' NEQ '0' ( | |
| echo Run CMD as Administrator... | |
| goto goUAC | |
| ) else ( |
| #!/bin/bash | |
| # Check if the user is root | |
| if [ "$(id -u)" -eq 0 ]; then | |
| IS_ROOT=true | |
| CMD_PREFIX="" | |
| APT_CMD="apt-get" | |
| else | |
| IS_ROOT=false | |
| CMD_PREFIX="sudo" |
To public service port over the Internet, we can use ngrok This guide give you steps to do the follow things below:
| #!/usr/bin/env bash | |
| # wget -qO 0-pve.sh https://gist.github.com/sugoidogo/4684e4659431e17d15be20171160c1f9/raw/ && bash 0-pve.sh | |
| set -e | |
| export DEBIAN_FRONTEND=noninteractive | |
| export APT_LISTCHANGES_FRONTEND=none | |
| function download { wget $* || curl -fLO $*; } | |
| function stream { wget -qO- $* || curl -fsSL $*; } | |
| function package { apt $* || dnf $*; } | |
| echo "This script will download and run the installation script in a screen session" | |
| echo "The installation script will download post-installation scripts to $HOME and reboot the system upon successful installation" |
| #!/bin/bash | |
| if [ ! -d ~/.fonts ]; then | |
| mkdir -p ~/.fonts/nerd-fonts | |
| else | |
| echo ~/.fonts is exist | |
| fi | |
| sudo apt update && sudo apt install -y fontconfig unzip | |
| # Download nerd fonts | |
| #!/bin/bash |
| REM Show list the day with Modified Time | |
| REM for /f "tokens=*" %a in ('dir /b /od') do @echo %a %~ta | |
| REM Show list the day with Creation Time | |
| REM for /f "tokens=*" %a in ('dir /b /t:c') do @echo %a %~ta | |
| REM This will copy all files with Modified = current date and copy to the destination place | |
| @echo off | |
| REM set source backup location, source must place in "" | |
| set "source=c:\users\pc" | |
| REM set source backup location, source must place in "" | |
| set "des=d:\1" |