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 / DBA
Last active July 16, 2024 13:19
DBA helper
sudo service mysql stop
sudo service mysql start
@POMXARK
POMXARK / parallax-scroll-effect.html
Created July 7, 2024 07:44
parallax-scroll-effect
// https://codepen.io/chen1223/details/pqZWbg
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<style>
@import url('https://fonts.googleapis.com/css?family=Roboto+Condensed');
@POMXARK
POMXARK / index.html
Created July 6, 2024 05:26
Home Image parallax effect [GSAP + Lenis]
<section>
<div class="img">
<div class="img-container">
<img src="https://images.unsplash.com/photo-1498598457418-36ef20772bb9?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1200&q=80" />
</div>
</div>
</section>
<section>
<div class="img">
<div class="img-container">
@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
@POMXARK
POMXARK / Repository.php
Last active June 9, 2024 06:28
phpstorm file templates -> Laravel DDD Domain Service
// app/Repositories/${NAME}Repository
<?php
#parse("PHP File Header.php")
namespace App\Repositories;
class ${NAME}Repository implements ${NAME}RepositoryInterface
{
<?php
class UserRepository
{ }
class UserController {
private $userRepository;
public function __construct(UserRepository $repository)
{
@POMXARK
POMXARK / Dollar.java
Created June 4, 2024 13:02
TDD java junit
public class Dollar {
int amount;
Dollar(int amount) {
}
void times(int multiplier) {
}
}
@POMXARK
POMXARK / access.log
Last active June 4, 2024 09:55
parse_access_apache_log_txt
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
@POMXARK
POMXARK / main.py
Created June 4, 2024 08:25
expiration_date
# 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")