Skip to content

Instantly share code, notes, and snippets.

View realFranco's full-sized avatar
🚀
On a Rocket

Franco Gil realFranco

🚀
On a Rocket
View GitHub Profile
@realFranco
realFranco / php-tools.md
Created October 16, 2023 16:53
PHP tools that I have been using #php #composer #packgist #3v4l #phUML #uml #docker

PHP Tools

This file will contain information about some PHP based tools that I have to use in order to write software products through PHP frameworks.

@realFranco
realFranco / README.md
Last active April 29, 2023 21:03
Linter `.sh` and `Dockerifle` files. #docker #bash #shell #hadolint #shellcheck
@realFranco
realFranco / Dockerfile
Last active March 31, 2023 13:06
AWS S3 intelligent tearing storage simulation - snippets #python3 #docker #docker-compose #orchestation #cli #http #nginx
# Location: .docker/api-rest/Dockerfile
from alpine:3.17.2
run apk update
run apk add \
python3=3.10.10-r0 \
py3-pip && \
pip3 install --no-cache-dir --upgrade fastapi uvicorn[standard]
@realFranco
realFranco / compose.yml
Last active February 18, 2023 19:31
SQL - Test
services:
db:
image: postgres:latest
container_name: pgsql
hostname: myhost
restart: always
environment:
POSTGRES_DB: test_db
POSTGRES_USER: root
POSTGRES_PASSWORD: root
@realFranco
realFranco / mac-os-commands.sh
Created January 27, 2023 17:51
MacOS commands that help me during work scenarios. #macos #mac #shell #debian #linux
# Jan 27th, 2023.
#
# As Debian user for a long long time I switch to macOS.
# This file will try set that help me during workflow scenarios.
- "command" + "arrow left or arrow right": Move at the start of the end of the line
- "fn" + "a": open the dock, the dock all time live hidden in my desktop to use a fully screen
- use three (3) fingers on the trackpad and move the hand from left to right in order to change quickly from apps.
@realFranco
realFranco / mock_s3.py
Created December 3, 2022 17:55
Apply a unit test at the AWS S3 service `get_object`. #aws #boto3 #botocore
"""
This code doesn't belongs to @realFranco.
See: https://stackoverflow.com/questions/72253062/write-unit-tests-for-python-lambda-using-botocore-stub-stubber
"""
import json
import boto3
@realFranco
realFranco / docker-compose-v2.sh
Created September 16, 2022 14:32
Install Docker Compose v2 inside ubuntu 20.04 LTS
mkdir -p ~/.docker/cli-plugins
curl -sSL https://github.com/docker/compose/releases/download/v2.11.0/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
docker compose version
# Docker Compose version v2.11.0
# This will let you run docker compose in the new form `docker compose .f compose.yaml up`
@realFranco
realFranco / docker-compse-upgrade-minor-version.sh
Created September 9, 2022 16:44
Upgrade docker-compose to 1.2.7.0 on ubuntu 20.04 LTS
> docker version
# mi versión de docker compose actual no me permite ejecutar compose > 3.7
> docker-compose -v
# docker-compose version 1.25.0, build unknown
> which docker-compose
# /usr/bin/docker-compose
# backup the old docker-compose
@realFranco
realFranco / docker-change-data-root.sh
Last active August 30, 2022 22:43
Change the "data-root" from the "docker" service, with the goal to reduce utilization on the "/var" partition.
# Motivation: As the "/var" partition (Linux Debian) could have a limited size
# and "docker" by default set volumes and images inside of "/var/lib" the partition
# could run out ouf space soon.
#
# My approach is to modify the "data-root" argument from the docker daemon, and move
# all the data into a partition with more free space ("home" in my case).
> docker version
Client: