Skip to content

Instantly share code, notes, and snippets.

View angelbladex's full-sized avatar

Luis García angelbladex

View GitHub Profile
#!/bin/bash
#put first letter of each word on Uppercase
cat file | tr "[A-Z]" "[a-z]" | sed -e "s/\b\(.\)/\u\1/g" > newFile
@angelbladex
angelbladex / validate2.sh
Last active September 3, 2024 15:16
Check page using HTTPie
#Other version for check page, using HTTPie
#previous version (using wget) >https://gist.github.com/angelbladex/dad9308bbdb7e18f384a
# HTTPie https://httpie.io/
function validate_url(){
#using Httpie
if [[ `http -h --verify no --timeout 10 $1 "Cache-Control: no-cache, no-store" | grep -E '200|320|302|303'` ]]; then
# using CUrl
@angelbladex
angelbladex / check_CVE-2024-3094.sh
Last active April 1, 2024 14:13
Idea for check CVE-2024-3094 on servers with Debian
#!/bin/bash
#Are you have multiple Debian servers? Use parallel-ssh instead
#Based on https://github.com/FabioBaroni/CVE-2024-3094-checker/tree/main
parallel-ssh -A -i -H "ip1 ip2 ip3 ... ipn" -l username "dpkg -l | grep xz-utils "
@angelbladex
angelbladex / Dockerfile
Last active September 3, 2025 19:59
Dockerfile para crear un contenedor de Php 5.2 con Apache desde Ubuntu 20.04 sin compilar
FROM ubuntu:20.04
# Configura zona horaria y repositorios en una sola capa
ENV DEBIAN_FRONTEND=noninteractive
RUN ln -fs /usr/share/zoneinfo/America/Caracas /etc/localtime && \
echo "America/Caracas" > /etc/timezone && \
echo "" > /etc/apt/sources.list && \
echo "deb http://ve.archive.ubuntu.com/ubuntu focal main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb http://ve.archive.ubuntu.com/ubuntu focal-security main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb http://ve.archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse" >> /etc/apt/sources.list && \
@angelbladex
angelbladex / Dockerfile
Last active September 3, 2025 19:50
A Docker container for check compatibility with PHP 5.3 to 8.1
# Usa la imagen base de PHP que necesites
FROM php:8.4-cli
# Instala git y unzip, necesarios para Composer
RUN apt-get update && apt-get install -y git unzip
# Instala Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer