Skip to content

Instantly share code, notes, and snippets.

View fabiofidanza's full-sized avatar

fabiofidanza

View GitHub Profile
@fabiofidanza
fabiofidanza / reverse-table-rows.css
Created April 3, 2024 20:13
Reverse table rows order
table {
transform: scaleY(-1);
}
tr {
transform: scaleY(-1);
}
@fabiofidanza
fabiofidanza / convertera.sh
Created March 20, 2024 17:23
Convert all wavs in a folder to mp3 + ogg
for f in *.wav; do ffmpeg -i "$f" -c:a libmp3lame -q:a 2 "${f/%wav/mp3}" -c:a libvorbis -q:a 4 "${f/%wav/ogg}"; done
@fabiofidanza
fabiofidanza / zzimia.js
Last active December 11, 2023 16:26
ZziMia™ — Hide your events title from your Google Calendar when you have to share your availability with other folks
let link = document.createElement('link');
link.href = "https://fonts.googleapis.com/css2?family=Redacted+Script:wght@700&display=swap";
link.rel="stylesheet";
document.body.appendChild(link);
document.querySelectorAll('*[data-eventchip]').forEach( (e) => {
e.style.fontFamily = "Redacted Script";
e.style.fontWeight = "700";
@fabiofidanza
fabiofidanza / Blur calendar
Created November 22, 2023 14:33
Blur Google calendar
document.querySelectorAll('*[data-eventchip]').forEach( (e) => {
e.style.filter="blur(4px)";
})
@media only screen and (max-width: 900px) {
* {
display: none;
}
}
precalculateColorTransition = function(fromHex, toHex, steps=30) {
const fromRGB = [ parseInt(fromHex.substr(0, 2), 16),
parseInt(fromHex.substr(2, 2), 16),
parseInt(fromHex.substr(4, 2), 16)
];
const toRGB = [ parseInt(toHex.substr(0, 2), 16),
parseInt(toHex.substr(2, 2), 16),
parseInt(toHex.substr(4, 2), 16)
.ajax-progress {
position: fixed;
text-align: center;
color: $teal;
padding: 20px 20px 0 20px;
width: auto;
height: auto;
font-weight: 700;
font-size: 5rem;
z-index: 90210;
@fabiofidanza
fabiofidanza / pecetta.css
Last active April 18, 2023 10:00
Cost-example pecetta
.cost-example--value:nth-child(3) {
position: relative;
}
.cost-example--value:nth-child(3)::after {
content: "Il più urgente";
position: absolute;
z-index: 9000;
font-size: 10px;
text-align: center;
<?php
$page = file_get_contents('https://risorse.arcipelagoeducativo.it/risorse/crucipuzzle-dellorientamento');
$title_re = '/<title>([^\/]+)<\/title>/m';
preg_match_all($title_re, $page, $matches, PREG_SET_ORDER, 0);
$title = $matches[0][1];
\s*<span>\s*(?:[^<]*|(?R))\s*<\/span>\s*
$re = '/\s*<span>\s*(?:[^<]*|(?R))\s*<\/span>\s*/imsU';