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
import os | |
import re | |
def clean_description_content(match): | |
content = match.group(1) | |
content = content.replace('"', '"') | |
content = content.replace("'", "") | |
return f'<meta name="description" content="{content}">' | |
def update_html_files(directory): |
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
// activeaza extensia zip din cPanel la "Select php version" sectiunea module | |
// selecteaza deci optiunea .zip din https://core13.spatiul.ro:2083/cpsess1391315882/frontend/jupiter/lveversion/php_selector.live.pl#/extensions | |
<?php | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); | |
$root_dir = realpath($_SERVER['DOCUMENT_ROOT']); | |
echo "<h1>Procesare fișiere 1.zip</h1>"; | |
echo "<p>Root directory: $root_dir</p>"; |
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
<?php | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); | |
echo "<h1>Test ZIP functionality</h1>"; | |
if (class_exists('ZipArchive')) { | |
echo "<p>ZipArchive class is available.</p>"; | |
} else { | |
echo "<p>ZipArchive class is NOT available.</p>"; |
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
<?php | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); | |
$root_dir = '/home/neculaif/public_html'; | |
$predefined_subdirs = [ | |
'af', 'ak', 'am', 'ar', 'as', 'ay', 'az', 'be', 'bg', 'bho', 'bm', 'bn', 'bs', 'ca', 'ceb', 'ckb', 'co', 'cs', 'cy', 'da', 'dhivehi', 'dogri', 'doi', 'dutch', 'dv', 'eo', 'esperanto', 'estonian', 'et', 'ewe', 'france', 'ht', 'hy', 'id', 'ig', 'ilo', 'it', 'iw', 'ja', 'jw', 'ka', 'km', 'ko', 'kri', 'ky', 'lb', 'lg', 'ln', 'lt', 'lv', 'mk', 'ml', 'mn', 'mr', 'ms', 'my', 'nl', 'no', 'nso', 'om', 'or', 'pt', 'qu', 'sa', 'si', 'sk', 'sm', 'sn', 'so', 'sq', 'st', 'su', 'sv', 'ta', 'tg', 'th', 'ti', 'tl', 'tt' | |
]; | |
$success_count = 0; |
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
<?php | |
$root_dir = '/home/neculaif/public_html'; | |
$predefined_subdirs = [ | |
'af', 'ak', 'am', 'ar', 'as', 'ay', 'az', 'be', 'bg', 'bho', 'bm', 'bn', 'bs', 'ca', 'ceb', 'ckb', 'co', 'cs', 'cy', 'da', 'dhivehi', 'dogri', 'doi', 'dutch', 'dv', 'eo', 'esperanto', 'estonian', 'et', 'ewe', 'france', 'ht', 'hy', 'id', 'ig', 'ilo', 'it', 'iw', 'ja', 'jw', 'ka', 'km', 'ko', 'kri', 'ky', 'lb', 'lg', 'ln', 'lt', 'lv', 'mk', 'ml', 'mn', 'mr', 'ms', 'my', 'nl', 'no', 'nso', 'om', 'or', 'pt', 'qu', 'sa', 'si', 'sk', 'sm', 'sn', 'so', 'sq', 'st', 'su', 'sv', 'ta', 'tg', 'th', 'ti', 'tl', 'tt' | |
]; | |
$commands = "#!/bin/bash\n\n"; | |
foreach ($predefined_subdirs as $subdir) { | |
$dir_path = $root_dir . '/' . $subdir; |
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
<?php | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); | |
$root_dir = '/home/neculaif/public_html'; | |
$predefined_subdirs = [ | |
'af', 'ak', 'am', 'ar', 'as', 'ay', 'az', 'be', 'bg', 'bho', 'bm', 'bn', 'bs', 'ca', 'ceb', 'ckb', 'co', 'cs', 'cy', 'da', 'dhivehi', 'dogri', 'doi', 'dutch', 'dv', 'eo', 'esperanto', 'estonian', 'et', 'ewe', 'france', 'ht', 'hy', 'id', 'ig', 'ilo', 'it', 'iw', 'ja', 'jw', 'ka', 'km', 'ko', 'kri', 'ky', 'lb', 'lg', 'ln', 'lt', 'lv', 'mk', 'ml', 'mn', 'mr', 'ms', 'my', 'nl', 'no', 'nso', 'om', 'or', 'pt', 'qu', 'sa', 'si', 'sk', 'sm', 'sn', 'so', 'sq', 'st', 'su', 'sv', 'ta', 'tg', 'th', 'ti', 'tl', 'tt' | |
]; | |
$success_count = 0; |
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
// activa extensia zip din cPanel la "Select php version" sectiunea module. // Selecteaza mai intai optiunea .zip | |
// https://core13.spatiul.ro:2083/cpsess1391315882/frontend/jupiter/lveversion/php_selector.live.pl#/extensions | |
// save file as unzip_realtime.php and then access from browser https://YOUR WEBSITE/unzip_realtime.php | |
<?php | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); | |
set_time_limit(0); | |
ini_set('output_buffering', '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
Text principal: | |
"Lucian Blaga remarca faptul ca 'Don Juan nu are o mie de pasiuni marunte, ci o singura pasiune virtuala'. Si, parca intr-un dialog cu aceasta idee, noteaza Eisenstein: 'De ce sa admitem donjuanismul numai in dragoste? Desigur ca ele exista mult mai mult si in toate domeniile? Si in primul rand tocmai in acelea unde lucrurile sunt legate de astfel de probleme ca succesul, aprecierea, victoriile, tot atat de clar ca in domeniul arenelor de dragoste. | |
Meditatiile din aceasta perioada il fac pe regizorul Serghei Eisenstein sa recunoasca stimulii psihologici, emotionali ai dezvoltarii sale, calea exacta a drumului pe care l-a urmat. Eisenstein incearca, intr-o chinuitoare cazna sa se inteleaga, sa-si faca bilantul existentei. Viata care i-a scapat printre degete, prin care a umblat ca Peer Gynt prin valtoarea frunzelor uscate – gandurile sale neimplinite. Si, fara doar si poate, bilantul, care cuprinde multe si esentiale victorii, ii redeschide durerile numeroaselor tragedii pe care le-a trait si |
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
import os | |
import ftplib | |
from ftplib import FTP | |
# Setări FTP | |
FTP_HOST = "ftp.YOUR-DOMAIN" # ftp host address. I use Cpanel | |
FTP_USER = "USER-NAME" | |
FTP_PASS = "PASSWORD" | |
# Directorul local și remote |
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
import os | |
import py7zr | |
import zipfile | |
import tempfile | |
import shutil | |
# Setăm directorul rădăcină | |
root_dir = r'e:\Carte\BB\17 - Site Leadership\Principal\2024 - TRADUCERI\FACUT 2024' | |
# Parcurgem toate subdirectoarele |
NewerOlder