Skip to content

Instantly share code, notes, and snippets.

View wilsenhc's full-sized avatar
💻
Looking for work

Wilsen Hernández wilsenhc

💻
Looking for work
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
@wilsenhc
wilsenhc / composer-upgrader.yml
Created January 29, 2025 19:12
Composer auto-update
name: Automatic composer upgrade
on:
schedule:
- cron: '0 12 1 * *'
jobs:
types:
runs-on: ubuntu-24.04
@wilsenhc
wilsenhc / rector.php
Last active February 7, 2025 14:46
Rector config example
<?php
use Rector\CodeQuality\Rector\ClassMethod\ExplicitReturnNullRector;
use Rector\CodeQuality\Rector\If_\ConsecutiveNullCompareReturnsToNullCoalesceQueueRector;
use Rector\CodeQuality\Rector\Isset_\IssetOnPropertyObjectToPropertyExistsRector;
use Rector\CodingStyle\Rector\ArrowFunction\StaticArrowFunctionRector;
use Rector\CodingStyle\Rector\Closure\StaticClosureRector;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\PostInc\PostIncDecToPreIncDecRector;
use Rector\CodingStyle\Rector\Use_\SeparateMultiUseImportsRector;
@wilsenhc
wilsenhc / composer-upgrade.yml
Last active August 3, 2023 03:20
GitHub Action to automatically upgrade Composer dependencies based on a Cron Schedule
name: Automatic composer upgrade
on:
schedule:
- cron: '0 0 1 * *'
jobs:
types:
runs-on: ubuntu-latest
@wilsenhc
wilsenhc / keychron_linux.md
Created September 26, 2022 15:26 — forked from andrebrait/keychron_linux.md
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work

Keychron Keyboards on Linux use the hid_apple driver (even in Windows/Android mode), both in Bluetooth and Wired modes. By default, this driver uses the F-keys as multimedia shortcuts and you have to press Fn + the key to get the usual F1 through F12 keys.

<?php
namespace App\Facades;
use Illuminate\Support\Facades\Facade;
/**
* Global Vite Facade
*
* @method static string useCspNonce(?string $nonce = null)
@wilsenhc
wilsenhc / genDeMatricesDiagDominante.c
Created March 31, 2018 00:34
Generadores de Matrices
/*Generador de Casos Jhon Coello*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main()
{
int dimension = 100, i, j;
srand(time(NULL));
printf("%d\n0.00001\n%d\n", dimension, dimension*dimension);
@wilsenhc
wilsenhc / Ejercicio4.cpp
Last active February 28, 2018 18:54
SPLINES
#include <iostream>
#include <cmath>
#include <list>
using namespace std;
string colors[13] = {"blueviolet", "cadetblue", "coral", "cyan", "darkorchid", "darkred",
"goldenrod", "hotpink", "lime", "orange", "tomato", "darkgreen", "red"};
void NaturalCubicSpline(double x[], double y[], int N, double b[], double c[], double d[])
@wilsenhc
wilsenhc / deletedata.sql
Last active February 15, 2018 23:40
Base de Datos
-- Eliminar tuplas de la base de datos
-- Eliminar tuplas de Cliente
DELETE FROM RestDB.Cliente;
@wilsenhc
wilsenhc / prueba-incrementar-punteros.c
Created January 17, 2018 00:19
Prueba Incrementar Punteros
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
/*
Para compilar:
gcc -lm prueba-incrementar-punteros.c -o prueba
*/