Skip to content

Instantly share code, notes, and snippets.

View SolventaLuisFlores's full-sized avatar

Luis Flores SolventaLuisFlores

View GitHub Profile

AlpineJS with ViteJS

ViteJS is a modern JavaScript build tool that can be used to build modern JavaScript frameworks including ReactJS and VueJS to name only two. In this tutorial you will explore how to use ViteJS with AlpineJS. This will prepare you for using ViteJS with ReactJS or other modern web framework.

Modern JavaScript built tools like ViteJS, ParcelJS & react-create-app (built with webpack) embrace ES Modules. Meaning that external dependencies are installed via npm and imported. So no more script, style or link tags. HTML, CSS & JavaScript are bundled into compact bundle.

Create app using Vite

Let's start exploring ViteJS by creating a new application. Using this command:

@SolventaLuisFlores
SolventaLuisFlores / SessionTimeout.php
Created August 8, 2023 14:42 — forked from mtvbrianking/SessionTimeout.php
Laravel implement user session timeout
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Auth;
class SessionTimeout
{
@SolventaLuisFlores
SolventaLuisFlores / wsl2-network.ps1
Created September 6, 2022 14:09 — forked from daehahn/wsl2-network.ps1
WSL 2 TCP NETWORK FORWARDING
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
netsh interface portproxy show v4tov4;
exit;
}
@SolventaLuisFlores
SolventaLuisFlores / README.md
Created September 10, 2021 19:47 — forked from djfdyuruiry/README.md
WSL 2 - Enabling systemd

Enable systemd in WSL 2

This guide will enable systemd to run as normal under WSL 2. This will enable services like microk8s, docker and many more to just work during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.

  • To enable systemd under WSL we require a tool called systemd-genie

  • Copy the contents of install-sg.sh to a new file /tmp/install-sg.sh:

    cd /tmp