Skip to content

Instantly share code, notes, and snippets.

View edhgt's full-sized avatar
馃彔
Working from home

Danilo Hernandez edhgt

馃彔
Working from home
View GitHub Profile
@edhgt
edhgt / login-custom.php
Last active July 30, 2025 20:33
Login custom laravel
<?php
protected function login(Request $request)
{
$this->validateLogin($request);
$user = User::where('username', $request->email)
->orWhere('email', $request->email)
->first();
if ($user) {
@edhgt
edhgt / firma-avanzada-contrato.php
Last active July 11, 2025 14:59
Consumo de api de firma electr贸nica avanzada utilizando laravel
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Auth;
use App\Models\User;
use App\Models\documento_x_usuario;
@edhgt
edhgt / sources.list
Created March 26, 2025 18:34
apt sources list debian 12 bookworm
#deb cdrom:[Debian GNU/Linux 12.10.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20250315-10:10]/ bookworm contrib main non-free-firmware
# Releases of the main packages.
deb [arch=amd64] http://ftp.mx.debian.org/debian/ bookworm main contrib non-free
deb-src [arch=amd64] http://ftp.mx.debian.org/debian/ bookworm main contrib non-free
# Updates that cannot wait for the next point release.
deb [arch=amd64] http://ftp.mx.debian.org/debian/ bookworm-updates main contrib non-free
deb-src [arch=amd64] http://ftp.mx.debian.org/debian/ bookworm-updates main contrib non-free

Instalaci贸n de tomcat en gnu-linux

Paso 1: Creaci贸n de carpetas y usuarios

sudo mkdir /opt/tomcat
sudo groupadd tomcat
sudo useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat

Paso 2: Descargar y descomprimir binarios de tomcat

@edhgt
edhgt / ali.md
Created February 20, 2021 08:04

Administraci贸n de Servidores GNU/Linux Intecap 2021

Soluci贸n a error que sali贸 en virutal box:

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

'/sbin/vboxconfig'

Aumentar el tama帽ao de carga de archivos en php

Modificando php.ini

Primero de todo tenemos que localizar el archivo de configuraci贸n (global) de PHP (php.ini) que puede estar ubicado en diferentes rutas dependiendo del sistema operativo o de la distribuci贸n Linux que usemos. Y una vez localizado, tenemos que editarlo y modificar las siguientes l铆neas

upload_max_filesize = 10M
post_max_size = 20M
max_execution_time = 180

Autoincrement en MySQL

show variables where Variable_name LIKE '%autoin%';

Configuraci贸n de variable MySQL para que el autoincrement no se desfase si alguna inserci贸n falla.

innodb_autoinc_lock_mode=0;