Skip to content

Instantly share code, notes, and snippets.

View maitret's full-sized avatar
🤓
Programando ando...

Luis S. Lopez Maitret maitret

🤓
Programando ando...
View GitHub Profile
@ph33nx
ph33nx / backup_mysql_db.sh
Last active June 5, 2025 11:20
This bash script automates the process of daily backups for all MySQL/MariaDB databases on a Linux server. It stores each database backup in a dedicated directory under /var/backups/mysql/ and names the backup files using the format <database_name>_<date_time>.sql. Additionally, the script includes a cleanup function that deletes backups older t…
#!/bin/bash
# backup_mysql_db.sh
# This script backs up each MySQL/MariaDB database into its own file daily.
# The backups are stored in /var/backups/mysql/<database_name>/<database_name>_<date_time>.sql
# Backups older than 30 days are automatically deleted.
#
# Author: Ph33nx
# GitHub: https://github.com/ph33nx
#
@ph33nx
ph33nx / WinMasterBlocker.bat
Last active October 26, 2025 14:01
Block All Adobe .exe files via Firewall on Windows Using Batch Script | Stop adobe apps to access internet
:: ################################################################
:: ## 🔥 WinMasterBlocker 🔥 #
:: ################################################################
:: # Author: https://github.com/ph33nx #
:: # Repo: https://github.com/ph33nx/WinMasterBlocker #
:: # #
:: # This script blocks inbound/outbound network access #
:: # for major apps like Adobe, Autodesk, Corel, Maxon, #
:: # and more using Windows Firewall. #
:: # #
@JCervantesB
JCervantesB / .htaccess para public
Last active March 11, 2025 04:24
htaccess para proyectos MVC CodigoConJuan
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
@jcubic
jcubic / cdn.md
Last active October 3, 2025 14:08
How to setup a literally free CDN
@maitret
maitret / php-curl-request-multipart.md
Created September 15, 2021 17:01 — forked from ramingar/php-curl-request-multipart.md
PHP cURL request multipart/form-data #php #curl #request #multipart #formdata #file #upload
$ch = curl_init();

$headers   = array();
$headers[] = "Authorization: Bearer " . $apiToken;
//$headers[] = "Content-Type: multipart/form-data";     // ERROR: no uses esta cabecera. Si $post es un array, la cabecera se añade automáticamente. Si se añade manualmente, me ha pasado que el boundary o el base64 se genera mal.

$cfile = new \CURLFile($fileNameWithFullPath);

//$post = array($fieldName => '@/tmp/phpDT8j');         // ERROR: no uses '@'. Genera errores en el base64. Desde PHP 5.5 está obsoleto. En su lugar usar CURLFile.
@mote0230
mote0230 / mail.php
Last active April 27, 2024 08:23 — forked from rantastic/mail.php
PHP: Send email using amazon SES with AWS Signature Version 4
<?php
//class docs: http://www.orderingdisorder.com/aws/ses/
require_once('ses.php');
//get credentials at http://aws.amazon.com My Account / Console > Security Credentials
$ses = new SimpleEmailService('ACCESSkeyID', 'SECRETaccessKEY', 'eu-west-1', 'email.eu-west-1.amazonaws.com');
//print_r($ses->listVerifiedEmailAddresses());
@maitret
maitret / chucherias.md
Last active October 11, 2023 22:37 — forked from epsa-dev/chucherias.md
Terminal: Buscar, mover, listar, eliminar

** Listar y ordenar por tamaño Linux **

du -sh * | sort -h

** Listar y ordenar por tamaño NuShell**

ls -d | sort-by size -r

Buscar archivos con cierta ext:

@epsa-dev
epsa-dev / chucherias.md
Last active February 17, 2023 17:46
Terminal: Buscar, mover, listar, eliminar

Checar el tamaño de carpetas:

du -h --max-depth=1 

Elimina error_log:

find -name "error_log" -exec rm -f '{}' \;

Mueve archivos a otra carpeta:

@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active October 25, 2025 18:24
crack activate Office on mac with license file
@msdzero
msdzero / chartjs_jquery_ajax_example.html
Created March 3, 2017 01:08
Chart.js example using Jquery Ajax to populate labels and data
<canvas id="myChart" width="400" height="100"></canvas>
<script src="/js/Chart.min.js"></script>
<script>
$(function () {
var ctx = document.getElementById("myChart").getContext("2d");
// examine example_data.json for expected response data
var json_url = "example_data.json";
// draw empty chart