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
<?php | |
namespace App\Http\Middleware; | |
use Filament\Facades\Filament; | |
use Filament\Models\Contracts\FilamentUser; | |
use Illuminate\Auth\Middleware\Authenticate as Middleware; | |
use Illuminate\Support\Facades\Session; | |
class RedirectIfNotFilamentAdmin extends Middleware |
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
sudo apt install python3.8 -y | |
sudo apt install python3.8-distutils | |
python3.8 -m pip install setuptools | |
sudo apt install python3.8-venv | |
python3.8 -m venv .venv |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>QWebChannel Client</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.css" /> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> | |
<script type="text/javascript" src="qwebchannel.js"></script> |
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
"""create a remote connection to a webapp.""" | |
import sys | |
import json | |
from PySide6.QtWidgets import QApplication, QMainWindow | |
from PySide6.QtNetwork import QHostAddress, QSslSocket | |
from PySide6.QtWebChannel import QWebChannel, QWebChannelAbstractTransport | |
from PySide6.QtWebSockets import QWebSocketServer | |
from PySide6.QtWebEngineWidgets import QWebEngineView |
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
<html> | |
<head> | |
<script src="qrc:///qtwebchannel/qwebchannel.js"></script> | |
<style> | |
::selection { | |
background: transparent; | |
} | |
</style> | |
</head> |
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 sys | |
from PyQt5.QtCore import QUrl, QSize | |
from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineScript, QWebEnginePage, QWebEngineProfile | |
from PyQt5.QtWidgets import QToolBar, QAction, QLineEdit, QLabel, QMainWindow, QTabWidget, QApplication | |
from PyQt5.QtNetwork import QNetworkCookie | |
import http.cookiejar | |
def create_script(name, src, injection_point = QWebEngineScript.DocumentCreation, world = QWebEngineScript.MainWorld, on_subframes = True): | |
script = QWebEngineScript() | |
script.setSourceCode(src) |
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 json | |
from PySide6 import QtCore, QtWebChannel | |
from PySide6.QtWidgets import QApplication | |
from PySide6.QtWebEngineWidgets import QWebEngineView | |
from PySide6.QtWebChannel import QWebChannel | |
from PySide6.QtCore import QObject, Slot, QUrl, QJsonValue | |
import os |
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
# python = 3.9.4 | |
import datetime | |
now = datetime.datetime.now() | |
print(now.strftime("%d.%m.%Y %H:%M:%S")) | |
date_today = now.strftime("%a %b %d 8:00:00 %Y") | |
date_today = datetime.datetime.strptime(date_today, "%a %b %d %H:%M:%S %Y") | |
date_today_f = date_today.strftime("%d.%m.%Y %H:%M:%S") |
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
127.0.0.1 - - [01/Apr/2022:18:19:15 +1000] "\x16\x03\x01\x02" 400 326 "-" "-" | |
127.0.0.1 - - [01/Apr/2022:18:19:15 +1000] "\x16\x03\x01\x02" 400 326 "-" "-" | |
127.0.0.1 - - [01/Apr/2022:18:20:15 +1000] "\x16\x03\x01\x02" 400 326 "-" "-" | |
127.0.0.1 - - [01/Apr/2022:18:20:15 +1000] "\x16\x03\x01\x02" 400 326 "-" "-" | |
::1 - - [01/Apr/2022:18:22:10 +1000] "GET /phpmyadmin/ HTTP/1.1" 200 18361 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Edg/99.0.1150.55" | |
::1 - - [01/Apr/2022:18:22:13 +1000] "GET /phpmyadmin/themes/pmahomme/css/theme.css?v=5.1.1&nocache=2250110580ltr&server=1 HTTP/1.1" 200 214799 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Edg/99.0.1150.55" | |
::1 - - [01/Apr/2022:18:22:14 +1000] "GET /phpmyadmin/js/messages.php?l=ru&v=5.1.1 HTTP/1.1" 200 12908 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/5 |
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
public class Dollar { | |
int amount; | |
Dollar(int amount) { | |
} | |
void times(int multiplier) { | |
} | |
} |