This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Example: Cap text at a specific line length. | |
* Especially useful for e.g. card/ tile layouts with different content but equal heights. | |
*/ | |
.text-overflow { | |
--lines: 3; | |
height: calc(var(--lines) * 1.25rem); | |
font-size: 1rem; | |
line-height: 1.25rem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* CMS editor / Shopping experiences: Hide rarely used section by default. | |
*/ | |
.sw-cms-slot { | |
display: block; | |
min-height: 100px !important; | |
} | |
.sw-cms-sidebar__block-settings .sw-collapse:first-child .sw-collapse__content { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker exec -i --user=111:222 $(docker ps -q) /usr/bin/php "$@" | |
# Get PHP executable from container and send any argument to it. | |
# | |
# Assumptions | |
# - Calls the current container (docker ps -q). | |
# - Assumes PHP path exists in container as shown. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface ILogger { | |
log(...args: any[]): void; | |
info(): void; | |
error(): void; | |
enable(): void; | |
disable(): void; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Exemplary snippets I've been using in my own projects. Use for inspiration and take what you need. | |
# 'sh' file format is for syntax highlighting only: The RegEx parts should work in many scenarios. | |
# | |
# Run all snippets to normalize varying strings by replacing or removing characters (as you need). | |
# Once all strings are aligned, duplicates can be filtered and lines sorted. | |
# This leaves the log with a few distinct, unique errors that are to be considered for development. | |
# RegEx design aims to leave the log syntax intact, e.g., delimiters (,"'). | |
# This might be relevant for proper syntax highlighting or use with advanced analyzers. | |
# --- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App; | |
use Exception; | |
use function addslashes; | |
use function file_get_contents; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Find in date range | |
SELECT * | |
FROM example | |
WHERE (updated >= '1970-01-01' AND updated <= DATE_ADD('1970-01-01', INTERVAL 1 DAY)) | |
-- AND ... | |
-- Find by date format | |
SELECT * FROM example | |
-- WHERE ... | |
AND YEAR(updated_at) >= '1970' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Custom font scaling mechanism. | |
// | |
// This allows keeping a standardized base font size (e.g. 16px ~ 1rem), | |
// but applying custom scales for anything that is not regular text flow. | |
// Font scale factors (here large Desktop set as base scale). | |
$font-breakpoints: ( | |
xs: 0.65, | |
sm: 0.7, | |
md: 0.75, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Utility aliases to call from within running Vagrant box. Speed up fixing common, recurring issues during development. | |
# @todo - Adjust paths and commands as needed. | |
# TOC | |
# - Symfony | |
# - Logs | |
# - SYSTEM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"> | |
<arg name="basepath" value="." /> | |
<arg name="cache" value=".phpcs-cache" /> | |
<arg name="extensions" value="php" /> | |
<arg name="colors" /> | |
<arg name="report" value="summary" /> |
NewerOlder