Skip to content

Instantly share code, notes, and snippets.

<?php
$matches = array();
preg_match("/\w{1}:(\\[\w .]+)*:(\d+)/", "-> function_exists('shell_exec') D:\cygwin\home\admin\work\symfony\lib\command\sfFormatter.class.php:28", $matches);
echo $matches[0];
$ bin/console debug:container directory_namer
// This service is a public alias for the service
// Vich\UploaderBundle\Naming\SubdirDirectoryNamer
Information for Service "Vich\UploaderBundle\Naming\SubdirDirectoryNamer"
=========================================================================
Directory namer wich can create subfolder depends on generated filename.
<?php
namespace App\Entity;
use Symfony\Component\HttpFoundation\File\File;
class Attachment
{
/**
* @param File|null $image
* @throws \Exception
@HongKilDong
HongKilDong / git-clearHistory
Created July 24, 2021 07:33 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
source <(curl -L https://api.github.com/gists/c77e1d7b41176237ba2a58ab0b5c7c74 | cat | jq -r .files.\"bash-helpers.sh\".content)
@HongKilDong
HongKilDong / .bashrc-function
Last active August 20, 2021 07:34
function to fetch merge build and push for nfc
function dbsy() {( set -e
git fetch && git merge --no-edit origin/$1
if git diff --name-only HEAD@{0} HEAD@{1} | grep -q 'composer.lock'; then
php73 composer.phar install
else
php73 bin/console cache:clear
fi
php73 bin/console doctrine:migrations:migrate --no-interaction -vv
)}
@HongKilDong
HongKilDong / lyrfgpixel.html
Created September 27, 2021 08:17
lyr fb pixel
<script> !function (f, b, e, v, n, t, s) {
if (f.fbq) return;
n = f.fbq = function () {
n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments)
};
if (!f._fbq) f._fbq = n;
n.push = n;
n.loaded = !0;
n.version = '2.0';
n.queue = [];
Когда возникла необходимость в разработке сложных программных систем умные люди придумали сначала долго и тщательно прорабатывать все планы и спецификации, набивать ими шкафи, и только потом долго и тщательно имплементить это все четко и по бумажке. Но проблема в том, что к настоящему моменту они, почему то, практически все вымерли. Для них не осталось кормовой базы, их вытеснили более гибкие и адаптивные сородичи. Может дойти до того что бумажек вообще может не быть. Вы же читали статью ? Дело доходит до "экстремальных" практик ) По бумажке кашу уже не сваришь, прошли те времена. Так что надо всегда быть готовым быть гибче и брать ответственность.
Иначе плакали наши корма.
Odiseo\BlogBundle\Model\Article:
type: mappedSuperclass
table: odiseo_blog_article
id:
id:
type: integer
id: true
generator:
strategy: AUTO
fields:
<?php
declare(strict_types=1);
namespace App\Entity\Blog;
use Doctrine\ORM\Mapping as ORM;
/**
* App\Entity\Blog\Article