2022. szeptember 7., szerda

Amikor a CloudFlare Rocketloader elrontja a Divi vizuális szerkesztőjét - Uncaught ReferenceError: jQuery is not defined

Cloudflare has a tool called Rocket Loader™.

Rocket Loader prioritises your website’s content (text, images, fonts etc) by deferring the loading of all of your JavaScript until after rendering. On pages with JavaScript, this results in a much faster loading experience for your users and improves the following performance metrics:

– Time to First Paint (TTFP)
– Time to First Contentful Paint (TTFCP)
– Time to First Meaningful Paint (TTFMP)
– Document Load

All these things are great normally, but when it comes to your Page Builder… they seem to break everything. It doesn’t matter if your page builder loads a few hundred milliseconds faster if it ultimately doesn’t work when it loads.

However, you probably do still want this feature turned on for most of your website. So that was the problem I found myself in. Do I sacrifice page speeds for convenience? Or do I just turn off Cloudflare every time I needed to update my website? Luckily, the answer is neither.

The fix for me was to simply make a Cloudflare Page Rule.

Step 1: Go to Page Rules in your Cloudflare Dashboard.

Cloudflare Page Rules Dashboard

Step 2: Click “Create Page Rule” and use an asterisk (*) to create your dynamic pattern. Since Divi uses “?et_fb=” as the url, I added *?et_fb=* to the end of my domain.

So now, if I go to https://zealoussites.com/what-we-do/wordpress-web-development/?et_fb=someid&PageSpeed=off or https://zealoussites.com/?et_fb=someotherid&someotherquery it will not serve the page with the Rocket Loader. This solved the problem for me. :)

See the screenshot below.

Use those asterisks to make a dynamic URL!

Problem Solved!

That’s it! The problem that had me tearing my hair out and frustrated for hours on end turned out to be a simple page rule issue. It would seem that sometimes you can have too much of a good thing when it comes to Cloudflare.



Hála hála!

keresőszavak: wordpress divi Uncaught ReferenceError: jQuery is not defined

 https://www.zealoussites.com/blog/how-to-fix-divi-page-builder-broke-with-cloudflare


2021. június 10., csütörtök

Chia farm

Chia farmok készítése terminálból:
./chia-blockchain/venv/bin/chia plots create -k 32 -n 30 -b 3000 -r 2 -f FARMER_KEY -p PLOT_KEY -d /root/plot -t /tmp/ctemp/

Távoli plot egyszeri lemásolása
rsync -P -a --remove-source-files --rsh=ssh  root@IP_ADDRESS_TO_YOUR_SERVER:/root/plot TARGET_FOLDER

Távoli plot ütemezett lemásolása (óránkénti ellenőrzés)
# crontab -e
0 * * * * rsync -P -a --remove-source-files --rsh=ssh  root@IP_ADDRESS_TO_YOUR_SERVER:/root/plot TARGET_FOLDER


https://serverspace.us/support/help/automate-tasks-with-cron-ubuntu-20-04/


Események grafikus követése: https://github.com/stolk/chiaharvestgraph


Minden ami Chia: chialinks.com/

2020. november 18., szerda

Linux Flatpak szoftver régi verzió telepítése (Zoom példa)

Zoom telepítése

flatpak install flathub us.zoom.Zoom


Régi verziók listája

flatpak remote-info --log flathub us.zoom.Zoom


...

          Kommit: fcd07f9b9db535f1e753bb193ca1f306619e6c7b4076359445eae3a8d70c52da

           Tárgy: Update zoom.tar.xz to 5.3.472687.1012 (66c7d92d)

           Dátum: 2020-10-12 11:33:50 +0000

...


Egy konkrét régi verzió telepítése

sudo flatpak update --commit=fcd07f9b9db535f1e753bb193ca1f306619e6c7b4076359445eae3a8d70c52da us.zoom.Zoom


Automatikus frissítések letiltása

sudo flatpak mask us.zoom.Zoom

2020. november 8., vasárnap

COVID statisztika letöltése és táblázatba exportálás Python szkript - covid2xls.py

Előkövetelmények:
  • Python 3
  • Két python könyvtár telepítése
    • pip3 install pandas 
    • pip3 install xlwt
 
Futtatás: python3 covid2xls.py

Kód:
 
import requests
import bs4
from bs4 import BeautifulSoup
import pandas as pd

#######################xlwt###########################

import xlwt
from xlwt import Workbook

wb = Workbook()

sheet1 = wb.add_sheet('Sheet 1')
sheet1.write(0, 0, 'Sorszám ')
sheet1.write(0, 1 ,'Nem')
sheet1.write(0, 2 ,'Kor')
sheet1.write(0, 3 ,'Alapbetegségek')

count=0

#######################xlwt###########################

for i in range(0,40):
    

    user_agent = 'Chrome/80.0.3987.132 Mozilla/5.0'
    response = requests.get(f"https://koronavirus.gov.hu/elhunytak?page={i}", stream=True,headers={'User-Agent': user_agent})

    soup = BeautifulSoup(response.text, 'html.parser')

    tables = soup.find_all('table')

    df = pd.read_html(str(tables))[0]

    print(df)

    for i in range(0,len(df["Sorszám"])):
        count=count+1
        sheet1.write(count, 0, str(df["Sorszám"][i]))
        sheet1.write(count, 1 ,str(df["Nem"][i]))
        sheet1.write(count, 2 ,int( df["Kor"][i]))
        sheet1.write(count, 3 ,str(df["Alapbetegségek"][i]))
        wb.save("out.xls")

2020. október 14., szerda

GNU Linux Mint 20 LTS szoftverek telepítése

sudo apt-get install -y vlc nautilus-image-converter audacity picard gimp krita p7zip bleachbit meld filezilla k3b

# OBS Studio - videók streamelése, képernyőfelvétel
sudo apt install ffmpeg
sudo add-apt-repository ppa:obsproject/obs-studio
sudo apt install -y obs-studio

# LibreOffice 7 irodai programcsomag
sudo add-apt-repository ppa:libreoffice/libreoffice-7-0
sudo apt install -y libreoffice 

sudo apt purge libreoffice-l10n-es libreoffice-l10n-pt libreoffice-l10n-zh-cn libreoffice-l10n-pt-br libreoffice-l10n-de libreoffice-l10n-ru libreoffice-l10n-zh-tw libreoffice-l10n-en-za libreoffice-l10n-it

# NFS meghajtók csatolásához

sudo apt install -y nfs-common


# --------------------------------------------------------

cd
cd Letöltések
cd Downloads

# --------------------------------------------------------

# Google szolgáltatások nélküli sima Chromium böngésző
# https://github.com/ungoogled-software/ungoogled-chromium-debian

echo 'deb http://download.opensuse.org/repositories/home:/ungoogled_chromium/Ubuntu_Focal/ /' | sudo tee /etc/apt/sources.list.d/home-ungoogled_chromium.list > /dev/null
curl -s 'https://download.opensuse.org/repositories/home:/ungoogled_chromium/Ubuntu_Focal/Release.key' | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home-ungoogled_chromium.gpg > /dev/null
sudo apt update
sudo apt install -y ungoogled-chromium

# --------------------------------------------------------

# Google Chrome böngésző
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb

# --------------------------------------------------------

# Zoom videókonferencia
wget https://zoom.us/client/latest/zoom_amd64.deb
sudo dpkg -i zoom_amd64.deb

# Másik verzió kell? https://forraskod.blogspot.com/2020/11/linux-flatpak-szoftver-regi-verzio.html


# --------------------------------------------------------


# Visual Studio Code fejlesztőkörnyezet (IDE)
# https://code.visualstudio.com/docs/?dv=linux64_deb
wget https://go.microsoft.com/fwlink/?LinkID=760868 -O vscode.deb
sudo dpkg -i vscode.deb

# --------------------------------------------------------

# Signal private messenger - titkosított csevegő
# https://www.signal.org/download/

# NOTE: These instructions only work for 64 bit Debian-based
# Linux distributions such as Ubuntu, Mint etc.

# 1. Install our official public software signing key
wget -O- https://updates.signal.org/desktop/apt/keys.asc |\
  sudo apt-key add -

# 2. Add our repository to your list of repositories
echo "deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main" |\
  sudo tee -a /etc/apt/sources.list.d/signal-xenial.list

# 3. Update your package database and install signal
sudo apt update && sudo apt install signal-desktop


# --------------------------------------------------------

# Elements titkosított csoportos csevegő (Slack-hez hasonló)
sudo apt install -y wget apt-transport-https

sudo wget -O /usr/share/keyrings/riot-im-archive-keyring.gpg https://packages.riot.im/debian/riot-im-archive-keyring.gpg

echo "deb [signed-by=/usr/share/keyrings/riot-im-archive-keyring.gpg] https://packages.riot.im/debian/ default main" | sudo tee /etc/apt/sources.list.d/riot-im.list

sudo apt update
sudo apt install element-desktop

# --------------------------------------------------------

# Draw.io diagram rajzoló

# https://github.com/jgraph/drawio-desktop/releases/latest 

# --------------------------------------------------------

# CudaText haladó szövegszerkesztő - 10 GB-os fájlokat is megnyit

# http://www.uvviewsoft.com/cudatext/

# --------------------------------------------------------

Acetoneiso - ISO BIN NRG MDF IMG fájlok megnyitása

sudo apt-get install acetoneiso

# NoiseTorch - Mikrofon zajszűrés (billentyűzet, ventillátor, stb.)

# https://github.com/lawl/NoiseTorch#download--install

cd

wget https://github.com/lawl/NoiseTorch/releases/latest/download/NoiseTorch_x64.tgz

tar -C $HOME -xzf NoiseTorch_x64.tgz

gtk-update-icon-cache

sudo setcap 'CAP_SYS_RESOURCE=+ep' ~/.local/bin/noisetorch

echo "Autostart setup: https://github.com/lawl/NoiseTorch/wiki/Start-automatically-with-Systemd"


 


 

2020. augusztus 18., kedd

Wordpress gyorsítás tapasztalatok - cache, bővítmények .htaccess, PHP

  • Mindennek az alapja egy jó "SSD"-s szerver (tárhely), ami gyors válaszidővel rendelkezik
  • Illetve egy gyors téma, pl. GeneratePress
  • Cache bővítmények: WP Super Cache, Hummingbird
  • Képoptimalizálók: Webp, Hummingbird
  • Képek gyorsítása CDN, pl. Jetpack
  • DDoS védelem, biztonság CDN, pl. Cloudflare
  • Ha a szerver támogatja az LSPHP-t, a .htaccess fájlba beírni:

AddHandler application/x-httpd-lsphp74 .php .php5



És a teszt :)
  • https://developers.google.com/speed/pagespeed/insights/
  • https://web.dev/measure/
  • https://gtmetrix.com/
  • https://www.webpagetest.org/