Skip to content

Instantly share code, notes, and snippets.

View POMXARK's full-sized avatar
🏠
Нет предела совершенству.

Бушуев Роман POMXARK

🏠
Нет предела совершенству.
View GitHub Profile
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(255) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL
);
CREATE TABLE conversations (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
@POMXARK
POMXARK / docker_wordpress.md
Created July 3, 2024 19:26 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
<?php
class UserRepository
{ }
class UserController {
private $userRepository;
public function __construct(UserRepository $repository)
{
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)
@POMXARK
POMXARK / index.html
Last active June 2, 2024 16:01 — forked from mphuie/index.html
pyqt webview javascript -> python example qtwebchannel PySide6 QWebChannel QWebEngineView
<html>
<head>
<script src="qrc:///qtwebchannel/qwebchannel.js"></script>
<style>
::selection {
background: transparent;
}
</style>
</head>
@POMXARK
POMXARK / qwebchannelexample.py
Created June 2, 2024 09:52 — forked from vidjuheffex/qwebchannelexample.py
QWebChannel Example Script
"""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
@POMXARK
POMXARK / qwebchannel-client.html
Created June 2, 2024 09:32 — forked from gencer/qwebchannel-client.html
QWebChannel Javascript Connector
<!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>
@POMXARK
POMXARK / instructions.txt
Created May 15, 2024 18:29 — forked from zachbrowne/instructions.txt
Create MYSQL database
mysql -u root -p
CREATE DATABASE testing;
GRANT ALL PRIVILEGES ON testing.* TO test_user@localhost IDENTIFIED BY 'test_pass';
FLUSH PRIVILEGES;
@POMXARK
POMXARK / laravel-mix.md
Created October 24, 2023 04:35 — forked from huzaifa-a/laravel-mix.md
Stand alone Laravel mix with Apache2

Configure browserSync

webpack.mix.js

mix.browserSync({
    proxy: 'localhost:8080',
    files: [
        'index.html',
    ]
@POMXARK
POMXARK / php.ini
Created October 20, 2023 06:20 — forked from dhimasanb/php.ini
My PHP Config for Laravel
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order: