پنل تحت وب مدیریت V2ray و ساخت کاربر و مدیریت سرور
mkdir x-ui && cd x-ui
docker run -itd --network=host \
-v $PWD/db/:/etc/x-ui/ \
-v $PWD/cert/:/root/cert/ \
| #Setup NextJS on Ubuntu server (Digital Ocean, EC2,...) Terminal Commands | |
| #based on my YouTube video | |
| #Recommended: An ubuntu server with at least 2 GB memory to handle npm run build | |
| #login to server | |
| ssh root@ip_address | |
| #Upgrade Server - may take a few minutes | |
| sudo apt update | |
| sudo apt upgrade |
| import os | |
| import asyncio | |
| import aiohttp # pip install aiohttp | |
| import aiofile # pip install aiofile | |
| REPORTS_FOLDER = "reports" | |
| FILES_PATH = os.path.join(REPORTS_FOLDER, "files") | |
| def download_files_from_report(urls): |
| check minidns | |
| check checktls.com | |
| -- | |
| ## | |
| random | |
| ssh [email protected] -p 2022 "tee -a /etc/dropbear/authorized_keys|tee -a ~/.ssh/authorized_keys" < ~/.ssh/id_rsa.pub | |
| mount -t cifs -o vers=1.0,uid=1000,iocharset=utf8,sec=ntlm,credentials=/tmp/.cred //192.168.123.45/home /tmp/wintmp #synology SMB1 | |
| mount -t cifs -o vers=3.0,uid=1000,iocharset=utf8,sec=ntlmv2,credentials=/tmp/.cred //192.168.123.45/home /tmp/winshare#synology SMB3 | |
| git add -A ;git commit -m "$(date -u +%Y-%m-%d-%H.%M)"" $COMMITCOMMENT" ;git push |
| server { | |
| listen 80 default_server; | |
| root /var/www; | |
| location / { | |
| set $cors ''; | |
| set $cors_allowed_methods 'OPTIONS, HEAD, GET'; | |
| if ($http_origin ~ '^https?://(www\.)?example.com$') { | |
| set $cors 'origin_matched'; |
Taken from a DigitalOcean tutorial.
Create and enable swapfile:
# create a 2GB file only accessible by root
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
# mark the file as a swap spaceCommand Flags
| Flag | Options | Description |
|---|---|---|
-codec:a |
libfaac, libfdk_aac, libvorbis | Audio Codec |
-quality |
best, good, realtime | Video Quality |
-b:a |
128k, 192k, 256k, 320k | Audio Bitrate |
-codec:v |
mpeg4, libx264, libvpx-vp9 | Video Codec |
| import tweepy | |
| import csv | |
| import pandas as pd | |
| ####input your credentials here | |
| consumer_key = '' | |
| consumer_secret = '' | |
| access_token = '' | |
| access_token_secret = '' | |
| auth = tweepy.OAuthHandler(consumer_key, consumer_secret) |