This file contains hidden or 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 | |
| enum Argument | |
| { | |
| case NONE; | |
| } | |
| trait UsesPropertyAccess | |
| { | |
| /** @var mixed|PropertyAccess */ |
This file contains hidden or 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 | |
| namespace VerteXVaaR; | |
| trait DelegatedProperty | |
| { | |
| public mixed $value { | |
| set(mixed $newValue) { | |
| if ($newValue instanceof PropertyContainer) { | |
| $this->value = $newValue; |
This file contains hidden or 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
| # Remove the leading 38 characters (`[05-Jun-2025 02:02:18 Europe/Berlin] `) | |
| cat /var/log/php/php-fpm-web.log | cut -b 38- > php_1.log | |
| # Remove the realpath web root portion which changes with each deployment | |
| cat php_1.log | sed 's|/var/www/deployed/releases/[0-9]*||' > php_2.log | |
| # sort first, so uniq reduces all eqal subsequent lines to one, add a counter for each reduced line and sort by the counter | |
| cat php_2.log | sort | uniq -c | sort -bgr > php_3.log | |
| # show the list of errors, ordered by number of times logged |
This file contains hidden or 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
| https://askubuntu.com/a/1230834 | |
| It was happening because Ubuntu turned on the sound card power-saving capabilities. Turning it off can be the only way to get rid of the annoying sound: | |
| Verify how is your sound card's power_save parameter: | |
| cat /sys/module/snd_hda_intel/parameters/power_save | |
| If it returns 1, do the following to change it temporally: | |
| echo "0" | sudo tee /sys/module/snd_hda_intel/parameters/power_save |
This file contains hidden or 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
| <html data-namespace-typo3-fluid="true" | |
| xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" | |
| xmlns:n="http://typo3.org/ns/CoStack/NextConf/ViewHelpers" | |
| > | |
| <n:touched> | |
| <h1>Here it goes</h1> | |
| <n:touch/> | |
| <n:touched> | |
| <h2>Not rendered</h2> |
This file contains hidden or 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\Tests\Acceptance; | |
| use CoStack\StackTest\BrowserTestCase; | |
| use CoStack\StackTest\Factory\SessionFactory; | |
| use CoStack\StackTest\Session; | |
| use DateTimeImmutable; |
This file contains hidden or 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
| # Delete all failed pods | |
| kubectl delete pods -A --field-selector=status.phase=Failed |
This file contains hidden or 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 | |
| # Taken from https://stackoverflow.com/a/44280885/2025722 | |
| # Added more devices (mainly from docker) to excluded list | |
| find /sys/class/net/ -maxdepth 1 -mindepth 1 ! -name "*lo*" ! -name "veth*" ! -name "br-*" ! -name "docker*" -exec sh -c 'cat "$0"/carrier 2>&1' {} \; | grep -q '1' |
This file contains hidden or 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
| const centreElement = function () { | |
| console.log('Debounced'); | |
| } | |
| const echoStuff = function () { | |
| console.log('Stuff'); | |
| } | |
| const createDebounce = function (fnc, delayMs) { | |
| var timeout = null; |
This file contains hidden or 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
| let previousTimeStamp = null, frames = 0; | |
| function counter(timestamp) { | |
| if (previousTimeStamp == null) { | |
| previousTimeStamp = parseInt(timestamp / 1000); | |
| } | |
| frames = frames + 1; | |
| const sec = parseInt(timestamp / 1000); | |
| if (sec !== previousTimeStamp) { | |
| previousTimeStamp = sec; |
NewerOlder