Skip to content

Instantly share code, notes, and snippets.

@JustinTimperio
JustinTimperio / download_from_minio.sh
Created November 4, 2020 19:23
Download a File to Minio with Curl and Zero External Libraries or Programs
#!/usr/bin/env sh
# Example: ./download_minio.sh example.url.com username password bucket-name minio/path/to/file.txt.zst /download/path/to/file.txt.zst
if [ -z $1 ]; then
echo "You have NOT specified a MINIO URL!"
exit 1
fi
if [ -z $2 ]; then
@devgnx
devgnx / BaseRequest.php
Created September 30, 2020 04:55
Symfony Request using illuminate/validation
<?php
namespace App\Request;
use Domain\Shared\MagicGetterSetter;
use Illuminate\Translation\ArrayLoader;
use Illuminate\Translation\Translator;
use Illuminate\Validation\ValidationException;
use Illuminate\Validation\Factory as ValidatorFactory;
use Symfony\Component\HttpFoundation\FileBag;
@Pen-y-Fan
Pen-y-Fan / Info for PHPStorm.md
Last active April 15, 2024 16:25
PHPStorm Tips, Tricks and setup

PHPStorm

PhpStorm Tips, ticks and standard setup

  1. Tips and Tracks for PHPStorm (PHPStorm Tips and Tricks.md)
  2. Standard setup for PHP projects (Standard.md)
@fesor
fesor / README.md
Last active November 3, 2023 06:50
What is OOP

Что такое ООП

Ссылки на материалы, позволяющее лучше понять оригинальную идею.

Quotes

Java and C++ make you think that the new ideas are like the old ones. Java is the most distressing thing to hit computing since MS-DOS.

Alan Kay

Learning Plan for Design Patterns and Principles of Good Design

These learning resources primarily focus on programming using Good Design Principles and Design Patterns

  • There is an emphasis on learning using PHP, although most patterns are universal to every object orientated language.
@luismts
luismts / GitCommitBestPractices.md
Last active April 23, 2024 13:02
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@me7media
me7media / PHPSTORM XDEBUG ubuntu NGINX php7.2-fpm
Created October 10, 2018 15:02
PHPSTORM XDEBUG ubuntu NGINX php7.2-fpm
sudo apt install php7.2-xdebug
sudo find / -name 'xdebug.so'
sudo gedit /etc/php/7.2/fpm/php.ini
sudo gedit /etc/php/7.2/cli/php.ini
sudo gedit /etc/php/7.2/cli/conf.d/20-xdebug.ini
[Xdebug]
; путь к файлу so, который мы временно сохаринили на шаге раньше
zend_extension=/usr/lib/php/20170718/xdebug.so
; остальные обязательные параметры
xdebug.profiler_enable_trigger=1
@esilvajr
esilvajr / image_phpstorm_server.png
Last active March 27, 2022 23:49
How to use XDebug inside a docker container.
image_phpstorm_server.png
@hurricane-voronin
hurricane-voronin / README.md
Last active April 24, 2024 17:28
Naming Classes Without a 'Manager'
[In reply to Moroshka]
Распишу по буквам, потом в совокупности
S - (SRP):
https://www.youtube.com/watch?v=AEnePs2Evg0
https://goo.gl/LatDmF (link wikipedia)
O - (Open/closed):
https://www.youtube.com/watch?v=DJF_sGOs2V4
https://goo.gl/6p3jfY (link wikipedia)
L - (Liskov):
https://www.youtube.com/watch?v=bVwZquRH1Vk