Skip to content

Instantly share code, notes, and snippets.

View wilsenhc's full-sized avatar
🎯
Focusing

Wilsen Hernández wilsenhc

🎯
Focusing
View GitHub Profile
@wilsenhc
wilsenhc / setup_cursor_ubuntu.md
Created May 8, 2025 20:41 — forked from evgenyneu/setup_cursor_ubuntu.md
Install Cursor AI code editor on Ubuntu 24.04 LTS

Install Cursor AI editor on Ubuntu 24.04

  1. Use the Download button on www.cursor.com web site. It will download the NAME.AppImage file.

  2. Copy the .AppImage file to your Applications directory

cd ~/Downloads
mkdir -p ~/Applications
mv NAME.AppImage ~/Applications/cursor.AppImage
<?php
namespace App\Listeners;
use Exception;
use Throwable;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Redis;
use Illuminate\Support\Facades\Process;
@wilsenhc
wilsenhc / failover_script
Last active January 21, 2026 16:05
Mikrotik Load Balancer
:local wan1_gateway [/ip route get [find dst-address=0.0.0.0/0 routing-table=wan1] gateway];
:local wan2_gateway [/ip route get [find dst-address=0.0.0.0/0 routing-table=wan2] gateway];
:local wan1_reachable [/ping $wan1_gateway count=3 interval=1];
:if ($wan1_reachable = 0) do={
/ip route set [find dst-address=0.0.0.0/0 routing-table=main] gateway=$wan2_gateway;
:log info "Failover: Switching to wan 2";
} else={