This file contains hidden or 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
import winreg | |
import datetime | |
from zvapp.logic.GENERAL import GEN | |
class Login: | |
# def login(): | |
# login = {} | |
# user_servers = Login.get_registry_servers("user_servers", "Software\\Ardom\\ZVPYTHON\\Servers") | |
# login['winreg'] = user_servers | |
# login['serversList'] = list(Login.JSON_try(user_servers,'user_servers').keys()) |
This file contains hidden or 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
#!/usr/bin/env python3 | |
""" | |
Add (or remove) a “# <relative‑path>” comment on the first line of selected files, | |
while skipping everything ignored by .gitignore. | |
New in v2 | |
────────── | |
• Respects .gitignore automatically | |
• Supports Dockerfile, Makefile, *.sh and .gitlab-ci.yml | |
""" |
This file contains hidden or 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
find ~/.config/google-chrome/ -name "Preferences" -exec sh -c ' | |
for file; do | |
dir=$(dirname "$file") | |
profile_name=$(jq -r .profile.name "$file") | |
echo "$dir: $profile_name" | |
done | |
' sh {} + |
This file contains hidden or 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
et -e # Exit on error | |
# Define versions | |
OPENSSL_VERSION="openssl-1.1.1k" | |
ZLIB_VERSION="zlib-1.2.12" | |
LIBFFI_VERSION="libffi-3.3" | |
PYTHON_VERSION="3.8.18" | |
# Define the final installation directory | |
FINAL_INSTALL_DIR="/opt/python3.8-static" |
This file contains hidden or 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 | |
# IP for Google's DNS server used for testing connectivity | |
TEST_IP=8.8.8.8 | |
# Ping TEST_IP using wlan0. If successful, ensure routing through wlan0 | |
if ping -I wlan0 -c 4 $TEST_IP > /dev/null; then | |
echo "Internet connectivity is available through wlan0. Adjusting routes..." | |
# Get the default gateway IP for wlan0 | |
GATEWAY_IP=$(ip route show default via | grep wlan0 | awk '{print $3}') |
This file contains hidden or 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/instgall sshd server | |
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 | |
# Start the SSH service | |
Start-Service sshd | |
# OPTIONAL: Set the SSH service to start automatically | |
Set-Service -Name sshd -StartupType 'Automatic' |
This file contains hidden or 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
[Unit] | |
Description=Seafile hub | |
After=network.target seafile.service | |
[Service] | |
Type=forking | |
# change start to start-fastcgi if you want to run fastcgi | |
ExecStart=/opt/seafilepro/seafile-server-latest/seahub.sh start | |
ExecStop=/opt/seafilepro/seafile-server-latest/seahub.sh stop | |
User=seafilepro |
This file contains hidden or 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
[Unit] | |
Description=Seafile | |
# add mysql.service or postgresql.service depending on your database to the line below | |
After=network.target | |
After=mysql.service | |
Requires=mysql.service | |
[Service] | |
Type=forking | |
ExecStart=/opt/seafilepro/seafile-server-latest/seafile.sh start |
This file contains hidden or 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
[fileserver] | |
port = 8082 | |
[database] | |
type = mysql | |
host = 127.0.0.1 | |
port = 3306 | |
user = seafile | |
password = P@sswd | |
db_name = seafile-db |
This file contains hidden or 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
[DATABASE] | |
type = mysql | |
host = 127.0.0.1 | |
port = 3306 | |
username = seafile | |
password = P@sswd | |
name = seahub-db | |
NewerOlder