Skip to content

Instantly share code, notes, and snippets.

View FrancescoLuzzi's full-sized avatar

Francesco Luzzi FrancescoLuzzi

View GitHub Profile
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
#![feature(iter_map_windows)]
# Cargo.toml
# [dependencies]
# crc = "3.3.0"
// 4KiB
@FrancescoLuzzi
FrancescoLuzzi / fix.ps1
Last active February 24, 2025 22:21
fix windows time sync
# more infos:
# https://learn.microsoft.com/it-it/troubleshoot/windows-client/active-directory/w32time-not-start-on-workgroup
# https://learn.microsoft.com/it-it/troubleshoot/windows-server/active-directory/client-clock-reverts-to-previous-time
sc.exe query w32time
# if status is stopped delete all triggers
sc triggerinfo w32time delete
# if status is stopped reconfigure w32time startup and shutdown
# sc.exe qtriggerinfo w32time
sc.exe triggerinfo w32time start/networkon stop/networkoff
# restart the pc and launch "sc.exe query w32time"
@FrancescoLuzzi
FrancescoLuzzi / login.ps1
Created January 14, 2025 23:47
First login with password on windows
# this will force a login to your account with password
# unlocking the ability to RDP into the machine
$email="[email protected]"
runas /u:MicrosoftAccount\$email winver
@FrancescoLuzzi
FrancescoLuzzi / public.go
Last active December 4, 2024 05:14
Serve precompressed files in fiber golang
package public
import (
"fmt"
"mime"
"path"
"sync"
"github.com/gofiber/fiber/v3"
"github.com/gofiber/fiber/v3/middleware/static"