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 | |
# Check if source database and destination directory are provided as command line parameters | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 <source_database> <destination_directory>" | |
exit 1 | |
fi | |
# Get the source database and destination directory from command line parameters | |
source_db="$1" |
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
/** | |
* @param {HTMLTableElement} table | |
*/ | |
export default function searchable(table) { | |
/** @type {Map<HTMLTableRowElement, string>} */ | |
const map = new Map(Array.from(table.tBodies[0].rows).map((row) => [row, row.innerText.trim().replace(/\s+/g, ' ')])); | |
const input = document.createElement("input"); | |
input.type = "text"; | |
input.placeholder = "Cerca..."; | |
input.addEventListener("input", () => { |
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
local settings = { | |
active = false, | |
main_scene_index = 1, | |
main_scene_probability = 0.75, | |
main_scene_min_duration_ms = 3000, | |
main_scene_max_duration_ms = 5000, | |
secondary_scene_min_duration_ms = 2000, | |
secondary_scene_max_duration_ms = 3000, | |
} |
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 | |
function array_transpose(array $array): array | |
{ | |
$keys = array_keys($array); | |
return array_map( | |
fn ($row) => array_combine($keys, $row), | |
array_map( | |
null, | |
...array_values($array), |