Convert images to JPEG with quality control via macOS Terminal.
File ./convert_to_jpeg.sh content:
#!/bin/bash
# This script converts various image types to JPEG with 75% quality.To do this we can use debug_backtrace:
// $backtrace = debug_backtrace();
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
// $caller = isset($backtrace[1]['function']) ? $backtrace[1]['function'] : 'unknown';
$caller = $backtrace[1]['function'] ?? 'unknown';To console.log every argument pushed to Google Tag Manager, use
window.dataLayer = window.dataLayer || [];
// Save the original push method
const originalPush = window.dataLayer.push;
// Monkey patch push
window.dataLayer.push = function() {To list mounted volumes use the following command in the Terminal (Applications > Utilities):
ls -la /Volumes/For instance, our SD card is mounted as NO NAME.
Let's check extended attributes
| -- Top 10 largest tables in a MySQL database | |
| -- MySQL 5.7.29 | |
| SELECT | |
| table_schema AS `Database`, | |
| table_name AS `Table`, | |
| ROUND((data_length + index_length) / 1024 / 1024, 2) AS `Size (MB)`, | |
| ROUND(data_length / 1024 / 1024, 2) AS `Data Size (MB)`, | |
| ROUND(index_length / 1024 / 1024, 2) AS `Index Size (MB)`, | |
| table_rows as 'Rows' |
| <?php | |
| declare(strict_types=1); | |
| function simpleGenerator() { | |
| echo "The generator begins\n"; | |
| for ($i = 0; $i < 3; ++$i) { | |
| yield $i; | |
| echo "Yielded $i\n"; |