composer create-project symfony/website-skeleton ~/Sites/client/project
composer req encore
Add to config/services.yaml
# Laravel queue worker using systemd | |
# ---------------------------------- | |
# | |
# /lib/systemd/system/queue.service | |
# | |
# run this command to enable service: | |
# systemctl enable queue.service | |
[Unit] | |
Description=Laravel queue worker |
use information_schema; | |
SELECT concat("ALTER DATABASE `",table_schema,"` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;") as _sql | |
FROM `TABLES` where table_schema like "database-name" group by table_schema; | |
SELECT concat("ALTER TABLE `",table_schema,"`.`",table_name,"` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;") as _sql | |
FROM `TABLES` where table_schema like "database-name" group by table_schema, table_name; | |
SELECT concat("ALTER TABLE `",table_schema,"`.`",table_name, "` CHANGE `",column_name,"` `",column_name,"` ",data_type,"(",character_maximum_length,") CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci",IF(is_nullable="YES"," NULL"," NOT NULL"),";") as _sql | |
FROM `COLUMNS` where table_schema like "database-name" and data_type in ('varchar','char'); |
<?php | |
// Pre-load all locale files to have a cache | |
function loadOtherTranslations() { | |
$existingTranslations = []; | |
$iterator = new RecursiveDirectoryIterator('src'); | |
/** @var \SplFileInfo $file */ | |
foreach(new RecursiveIteratorIterator($iterator) as $file){ |
# Redirect to HTTPS | |
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L] |
<?php | |
$document = new DOMDocument(); | |
$document->load($argv[1]); | |
$existingTranslations = []; | |
function getUserInput() { | |
return readline("\nTranslation PT: "); | |
} |
A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
<?php | |
$curl = curl_init(); | |
$header = []; | |
$header[] = 'Content-type: application/x-www-form-urlencoded'; | |
// user:password in base64 | |
$header[] = 'Authorization: Basic xxxxxx'; | |
curl_setopt($curl, CURLOPT_URL, 'http://url/user/add'); |
<?php | |
namespace ProductsBundle\Command; | |
final class CreateProduct extends ProductDataTransferObject | |
{ | |
} |
CREATE EXTENSION pg_buffercache;
select usagecount, count(*), isdirty from pg_buffercache
group by isdirty, usagecount order by isdirty, usagecount;
usagecount | count | isdirty