View compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
db: | |
image: postgres:latest | |
container_name: pgsql | |
hostname: myhost | |
restart: always | |
environment: | |
POSTGRES_DB: test_db | |
POSTGRES_USER: root | |
POSTGRES_PASSWORD: root |
View mac-os-commands.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. |
View mock_s3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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 | |
View naive_graph_traversing.ajs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Naive Graph Traversing. | |
console.log("edit a property from a relation"); | |
$("#id-733e2449d19b455db12241633b28cdab").prop("top_bottom", 0); | |
$("#id-733e2449d19b455db12241633b28cdab").prop("bottom_top", 0); | |
console.log("every input relation from the current element"); | |
$(ID).inRels().each(function(relation) { | |
if (relation.name){ | |
console.log(relation); |
View docker-compose-v2.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |
View docker-compse-upgrade-minor-version.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> 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 |
View docker-change-data-root.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: |
View input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 | |
1 | |
4 9 5 2 6 7 8 1 8 | |
1 3 0 0 | |
0 0 1 1 3 | |
2 6 0 0 1 7 | |
2 6 1 0 1 7 1 1 3 4 | |
0 1 2 3 4 5 6 | |
0 1 2 0 1 6 |
View join_python.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Write a function that perform as an SQL-join. | |
""" | |
BRAND = [ | |
{'id': 0, 'name': 'Ferrari', 'year': 1998}, | |
{'id': 1, 'name': 'Red Bull'}, | |
{'id': 2, 'name': 'Mclaren'} |
View oauth1_netsuite_header_signature.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Github: @realFranco | |
References: | |
- https://oauth.net/core/1.0/ | |
- steps: | |
- normalize request parameters | |
- create sign key |
NewerOlder