Skip to content

Instantly share code, notes, and snippets.

View funder7's full-sized avatar
Let's go!

Federico Ricchiuto funder7

Let's go!
View GitHub Profile
funder7 / isAssociativeArrayTest.php
Last active January 15, 2022 02:21
Unit testing a function that (tries to) determine if an array is associative (php >= 7.3)
namespace Tests\Unit;
// based on original work from the PHP Laravel framework
if (!function_exists('str_contains'))
function str_contains($haystack, $needle) {
return $needle !== '' && mb_strpos($haystack, $needle) !== false;
funder7 / vuetify_treeview_select-child-buttons.vue
Last active March 3, 2021 17:58
Adding +/- buttons to vuetify treeview component, allowing to select/deselect all childrens of a group with a single click
funder7 /
Last active January 8, 2021 00:09
Dart: Map all values of an Enum to another List of objects (uses "logger: ^0.9.4")

Dart - Enum to Object mapper - helper class

With practical example


Enums are a good way to represent a determined set of values, which I use often. They're good when used in code, or when matching some values returned from your backend APIs with the client code for example.

But moving on the UI, you cannot present them as-is to the end user, they must be converted into something more readable.

How it works

funder7 /
Last active December 15, 2020 12:38
Starts ngrok, and copies the tunnel hostname into an external file (in this case a spring config). It checks for ngrok executable & configuration file presence.
# Wrapper script to launch reverse proxy with local configuration
# and copy tunnel's hostname into (spring) yml configuration
# Created 15 december 2020 - Federico Ricchiuto <>
funder7 / OpenStreetMap-dark_style.css
Created September 19, 2020 15:05
OpenStreetMap - Dark mode style - AlexPS
* Style obtained from
* License: CC0 - Public Domain
* Author: AlexPS
@-moz-document url-prefix("")
overflow: visible;
funder7 /
Last active July 16, 2022 07:19
[WORKING] How to install Fedora Workstation 30 on Acer Switch 10 Tablet (SW5-012)

Preparation steps

I've downloaded the tool from fedora website, which automatically downloads the os image, and creates the usb for you. Set the password in the UEFI Setup, then disabled Secure Boot, set USB to be the first drive to boot. Save and exit.

Fedora Setup

Configure keyboard layout, then I've entered the drive setup section, you have leave selected the drive, then you can choose 3 options, I've selected the middle one, it's something like "manual setup", then I decided to completely wipe the windows stuff and made the partition table (GPT) like this:

mount point - partition type - size