Skip to content

Instantly share code, notes, and snippets.

View prognostic's full-sized avatar

Sergey Krasnodemsky prognostic

View GitHub Profile
@prognostic
prognostic / vscode.md
Created September 27, 2025 10:52
VSCode
code
@prognostic
prognostic / laravel.md
Last active September 1, 2025 09:19
Laravel
php artisan make:model Car
php artisan make:model Car -m
php artisan make:model Car --migration

php artisan make:migration create_cars_table

php artisan make:controller UserController

php artisan make:event UserCreated
@prognostic
prognostic / php
Created August 24, 2025 12:42
Entity
<?php
declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity;
@prognostic
prognostic / php
Created August 24, 2025 12:35
Controller
<?php
declare(strict_types=1);
namespace App\Controller\Profile;
use App\Entity\User;
use App\Security\UserResolver;
$.fn.tooltip.Constructor.VERSION
@prognostic
prognostic / nc.md
Last active June 25, 2024 17:28
netcat
nc -v www.google.com 80
GET / HTTP/1.1↵↵
nc -v localhost 3000

GET /page.html HTTP/1.0 ↵
Header1: Value1 ↵
@prognostic
prognostic / sed.md
Last active May 28, 2024 17:40
stream editor (search & replace, transform, filter)
@prognostic
prognostic / awk.md
Last active May 23, 2024 16:37
awk
awk '{print $2}' /etc/hosts
awk 'FNR<=10' file
echo "World Hello" | awk '{print $2, $1}'
awk '{print $NF}' Gemfile
seq 1 100 | awk '{s+=$1} END {print s}'
@prognostic
prognostic / lxc.md
Last active March 10, 2025 08:02
LXC
sudo lxc-ls -f
sudo lxc-create -n sandbox -t download
sudo lxc-create -n fedora -t fedora
sudo lxc-start -n sandbox
sudo lxc-attach -n sandbox

sudo lxc-info -n sandbox
sudo lxc-info -n sandbox -i
sudo lxc-info -n sandbox -iH