Skip to content

Instantly share code, notes, and snippets.

View HighLiuk's full-sized avatar
🏠
Working from home

Luca Di Fazio HighLiuk

🏠
Working from home
  • Idearia Srl
  • Rome
  • 16:26 (UTC +01:00)
View GitHub Profile
@HighLiuk
HighLiuk / example.ts
Last active January 3, 2024 11:24
WP Hooks with TypeScript
type Events = {
hook_1: string[];
hook_2: number;
};
const { addFilter, applyFilters } = new Filter<Events>();
addFilter('hook_1', callback)
// ^ autocomplete on event names
// ^ static analysis on callback functions based on the specific event
@HighLiuk
HighLiuk / README.md
Last active December 21, 2022 23:50
React Weekly Downloads segmented by version

React Weekly Downloads segmented by version

pie showData title By Major Release
"17":6077758
"16":5672055
"18":4997284
"15":360262
"Other":160137
@HighLiuk
HighLiuk / RefreshDatabaseOnce.php
Last active July 11, 2022 08:24
Laravel - Refresh Database Once
<?php
namespace Tests;
use Illuminate\Foundation\Testing\Traits\CanConfigureMigrationCommands;
/**
* Refreshes the database once.
*
* This is inspired by a post of Stefan Dreßler at medium.com