A mixin for writing @font-face rules in SASS.
Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.
@include font-face(Samplino, fonts/Samplino);
#!/bin/bash | |
# Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462 | |
find . -type f -iname "*.png" -exec optipng -nb -nc {} \; | |
find . -type f -iname "*.png" -exec advpng -z4 {} \; | |
find . -type f -iname "*.png" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \; | |
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim -f --strip-all {} \; |
<?php declare(strict_types=1); | |
require __DIR__ . '/../vendor/autoload.php'; | |
function run_command(string $command): void { | |
$loop = React\EventLoop\Factory::create(); | |
$process = new React\ChildProcess\Process($command); | |
$process->start($loop); | |
$process->on('exit', function ($exitCode) use ($command) { | |
// Trigger alerts that the command finished. |
Example of batched update some entities with hook_post_update_NAME() or hook_update_N().
If you should encounter the problem that some translations are wrongly translated with the equal source language string (for example in our case there were German translations for "Author" translated with "Author" or "Published" with "Published"), you may use the following snippet to list them.
SELECT s.lid,s.source, t.translation FROM `locales_source` s
INNER JOIN locales_target t
WHERE s.lid=t.lid AND CONVERT(s.source USING utf8) = CONVERT(t.translation USING utf8)
AND t.customized=1
To finally delete them, you may use something like this, but make a backup before and know what you're doing!