Skip to content

Instantly share code, notes, and snippets.

View MefhigosetH's full-sized avatar
:octocat:
Making a serverless-alpine docker image...

Victor Villarreal MefhigosetH

:octocat:
Making a serverless-alpine docker image...
View GitHub Profile
@maple3142
maple3142 / CVE-2025-55182.http
Last active January 4, 2026 12:14
CVE-2025-55182 React Server Components RCE POC
POST / HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Next-Action: x
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryx8jO2oVc6SWP3Sad
Content-Length: 459
------WebKitFormBoundaryx8jO2oVc6SWP3Sad
Content-Disposition: form-data; name="0"
@juliooa
juliooa / main.py
Last active November 21, 2025 12:18
Query your database with LLMs natural language
import json
import logging
import os
from fastapi import FastAPI
from openai import BaseModel
from dotenv import load_dotenv
import os
from typing import Any
import openai
@breadchris
breadchris / hybrid.py
Last active February 5, 2025 12:18
BM25 and FAISS hybrid search example
import numpy as np
from rank_bm25 import BM25Okapi
from sentence_transformers import SentenceTransformer
import faiss
class HybridSearch:
def __init__(self, documents):
self.documents = documents
# BM25 initialization
@V-Juarez
V-Juarez / Entorno de Desarrollo para php usando Docker.md
Last active March 10, 2025 02:28
Configuración de docker, php y nginx

Entorno de Desarrollo para php usando Docker 🐳

Quieres aprender php, pero las configuraciones te han abrumado y el deseo de aprender van mermando. No, no detengas tu aprendizaje, siempre existe una solución a los problemas. Instalar php, configurar un servidor web en Windows es muy sencillo, en Linux y macOS es otra situación. Debes conocer sobre la terminal, un editor de código, vim, nano, ser avanzado... y mucho más.

La herramienta que vamos a utilizar y que permite trabajar con php, un servidor web y la terminal es Docker.

Docker: Es una plataforma de software que permite crear, probar e implementar aplicaciones rápidamente.

Docker-compose: Es una herramienta para definir y ejecutar aplicaciones; es multicontenedor que permite simplificar el uso de Docker a partir de archivos YAML, de esta forma es más sencillo generar contendores que se relacionen entre sí, conectarlos, habilitar puertos, volúmenes, etc.

@tanaikech
tanaikech / submit.md
Created January 5, 2021 06:59
Downloading and Uploading File to Google Drive without Saving File with Stream and Resumable Upload using Node.js

Downloading and Uploading File to Google Drive without Saving File with Stream and Resumable Upload using Node.js

This is a sample script of Node.js for downloading the data and uploading the data to Google Drive with the resumable upload without saving it as a file. The downloaded data is uploaded to Google Drive with the stream.

Sample script

Before you use this, please set the variables of accessToken, url, fileSize, mimeType and filename. In this case, fileSize is required to set because the data is uploaded with the resumable upload.

const request = require("request");
@intelguasoft
intelguasoft / push_notifications_with_nodejs.md
Created April 30, 2020 02:15
Notificaciones Push de Firebase a Android con NodeJS

Notificaciones Push de Firebase a Android con NodeJS

Entonces, está desarrollando una aplicación móvil y se da cuenta de que necesita una forma de comunicarse con sus usuarios de una manera rápida y rentable. En este punto, estoy seguro de que has pensado en las notificaciones push. Ahí es donde entra Firebase Cloud Messaging (FCM).

Firebase Cloud Messaging (FCM) proporciona una conexión confiable y eficiente de la batería entre su servidor y dispositivos que le permite entregar y recibir mensajes y notificaciones en iOS, Android y la web sin costo alguno. Puedes leer más sobre esto aquí.

Ahora que hemos terminado con la introducción, vamos a sumergirnos en todo este vergueo.

Primero, debe iniciar sesión con su cuenta de Google en firebase. Luego haga clic en el enlace "Ir a la consola" que se encuentra junto al avatar de su cuenta y será redirigido a la consola del tablero de instrumentos, donde

@angeloxx
angeloxx / modsec-clamscan.lua
Last active July 16, 2024 15:13
ModSecurity ClamAV integration script (LUA)
#!/usr/bin/lua
--[[
This script can be used to inspect uploaded files for viruses
via ClamAV. To implement, use with the following ModSecurity rule:
SecRule FILES_TMPNAMES "@inspectFile /opt/modsecurity/bin/modsec-clamscan.lua" "phase:2,t:none,log,deny"
Author: Angelo Conforti (based on Josh Amishav-Zlatin code)
Requires the clamav-server and clamav-scanner
WINDNS %{NUMBER:log_date} %{TIME:log_time} %{WORD:dns_thread_id} %{WORD:dns_context}%{SPACE}%{WORD:dns_packet_id} %{WORD:dns_ip_protocol} %{WORD:dns_direction} %{IP:dns_client_address}%{SPACE}%{WORD:dns_xid}%{SPACE}(?:Q|R|U) ?(Q|R|U)?%{SPACE}[%{GREEDYDATA:dns_hex_flags}%{SPACE}%{WORD:dns_response}]%{SPACE}%{WORD:dns_recordtype}%{SPACE}([1-9][0-9]?)%{GREEDYDATA:dns_query_name}
@awilkins
awilkins / lvmcryptocache
Created May 8, 2015 15:39
Script to add an encrypted SSD cache to Ubuntu install using dm-cache and LUKS
#!/bin/bash
# Add an LVM cache pool on and attach it to the root volume
# Including LUKS encryption
# Assumes you are using an "all on root" setup
# If you are not, adapt it if you like
#
# Script licensed GPL3 or later
# © Adrian Wilkins May 2015
# Pass the name of the disk device you are using as a cache