Skip to content

Instantly share code, notes, and snippets.

View AARP41298's full-sized avatar

Aarón Rodríguez AARP41298

View GitHub Profile
import re
def fix_encoding(input_file, output_file):
# Leer el archivo en modo binario para trabajar con los bytes directamente
with open(input_file, 'rb') as f:
content = f.read()
# Decodificar el contenido
try:
#Para acentos, abrir con vs code y guardar con UTF8 con BOM
#Crear acceso directo que apunte al archivo.
#C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\location of the file\iniciar_servidores.ps1"
#Para iniciar cuando la PC inicie, poner el acceso directo en:
#C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
#also you can acces via Win + R `shell:startup`
from datetime import datetime
import subprocess
import requests
import time
import locale
import os
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
os.chdir(SCRIPT_DIR)
@AARP41298
AARP41298 / gist:c5e7685b8af4d57cd2d3c9c9d4d5ee40
Created June 24, 2025 01:08
phpstorm debug tinker console plugin
require 'C:\Todo\repos\ceaNewBack\vendor\autoload.php';
$app = require_once 'C:\Todo\repos\ceaNewBack\bootstrap\app.php';
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
//el plugin crea un archivo en AppData y se queda sin contexto del proyecto de laravel, hay que referenciarle el proyecto
#!/bin/sh
php -dxdebug.mode=debug -dxdebug.start_with_request=yes -dxdebug.client_port=9003 -dxdebug.client_host=127.0.0.1 -dxdebug.log=queue_xdebug.log "C:\Users\aarpfeb23\AppData\Roaming\JetBrains\PhpStorm2023.1\laravel-tinker\LaravelTinkerConsole.php"
#!/bin/sh
@AARP41298
AARP41298 / l4d2.md
Last active July 9, 2025 17:24
L4D2 Dedicated Server
@AARP41298
AARP41298 / rock_band_scrap.py
Created April 7, 2025 00:14
Listar TODAS las canciones instaladas de rock band RPCS3
#codigo de python para hacer scrap
import os
import re
def detectar_encoding(path):
with open(path, 'rb') as f:
try:
contenido = f.read(2048).decode("latin1")
match = re.search(r"\('encoding'\s*'([^']+)'\)", contenido)
if match: