This file contains 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
dd if=/dev/zero of=myfs.ext4 bs=1M count=10240 | |
mkfs.ext4 myfs.ext4 | |
docker inspect -f '{{ .GraphDriver.DataDir }}' <container_id> | |
mount -o loop /path/to/myfs.ext4 /path/to/writable/layer/folder |
This file contains 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
from flask import Flask, session | |
from flask_session import Session | |
app = Flask(__name__) | |
# Configure session type and secret key | |
app.config['SESSION_TYPE'] = 'filesystem' # You can use other options like 'redis' for better performance | |
app.config['SESSION_PERMANENT'] = True # Session lasts until the browser is closed |
This file contains 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
# Enable standalone mode and disable anonymous FTP | |
listen=YES | |
anonymous_enable=NO | |
# Allow local users to login | |
local_enable=YES | |
# Enable write access for local users | |
write_enable=YES |
This file contains 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
server { | |
listen 80; | |
server_name fe34fsd.openpanel.co; | |
location / { | |
sub_filter 'http://panel.pejcic.rs/ffff' 'http://fe34fsd.openpanel.co'; | |
sub_filter_once off; |
This file contains 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
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> | |
<img id="screenshot" src="/static/placeholder.png" alt="Screenshot"> | |
<script> | |
function updateScreenshot(domain) { | |
$.ajax({ | |
type: "GET", | |
url: "/screenshot/" + domain, |
This file contains 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
# Gunicorn configuration file | |
# https://docs.gunicorn.org/en/stable/configure.html#configuration-file | |
# https://docs.gunicorn.org/en/stable/settings.html | |
import multiprocessing | |
from gunicorn.config import Config | |
# Create a Gunicorn configuration object | |
config = Config() |
This file contains 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 | |
if [[ -e /dev/kvm || -e /dev/qemu || -e /proc/user_beancounters || -e /proc/xen || -e /proc/sys/xen || -e /sys/bus/xen ]]; then | |
echo "VPS (Virtual Private Server)" | |
elif [[ -f /.dockerenv || $(grep -sq 'docker\|lxc' /proc/1/cgroup) ]]; then | |
echo "Docker container" | |
else | |
echo "Dedicated server" | |
fi |
This file contains 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 | |
# Check if the correct number of command-line arguments is provided | |
if [ "$#" -ne 4 ]; then | |
echo "Usage: $0 <username> <password|generate> <email> <plan>" | |
exit 1 | |
fi | |
# Get data from command-line arguments | |
username="$1" |
This file contains 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 | |
echo "Container is starting..." | |
# Get the current container's IP address | |
CONTAINER_IP=$(hostname -i) | |
# Old IP address to be replaced on docker run | |
OLD_IP="" | |
# Get the container name |
This file contains 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 | |
echo "This is your chance now to cancel the update process." | |
echo "You can hit CTRL-C to abort, otherwise the install starts in a few seconds." | |
for ((i=1; i<=6; i++)) | |
do | |
sleep 1 | |
echo -n "." | |
done | |
echo "running" |