Skip to content

Instantly share code, notes, and snippets.

View luismts's full-sized avatar
🚀
Kaizen

Luis Matos luismts

🚀
Kaizen
View GitHub Profile
@luismts
luismts / GitCommitBestPractices.md
Last active April 15, 2024 09:00
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@luismts
luismts / requests.md
Last active January 22, 2024 00:13
Enhancements and Desired Features for Directus

Enhancements and Desired Features for Directus: Contributing to the Platform's Future

Directus is an open-source content management system that offers exceptional flexibility in creating custom content interfaces. The community surrounding Directus plays a vital role in its evolution and continuous improvement. One of the most effective ways to influence the development of this platform is through requesting new features or improvements.

Through GitHub, the Directus team values the contributions and suggestions from the community. This article aims to compile a list of features and enhancements that could further drive the utility and versatility of Directus.

🚀 Your Voice Matters! Join and Support these Key Enhancements for Directus 🌟

Features:

Docker Best Practices

  • Keep containers stateless.
  • Use COPY instead of ADD.
  • Make COPY last line before CMD or ENTRYPOINT.
    • Each line in the Dockerfile is cached.
    • Separate COPY of requirements.txt from source code.
  • CMD vs ENTRYPOINT: ENTRYPOINT is the main command. Treat CMD as the default flag for the entrypoint. Example:
@luismts
luismts / rest-api-response-format.md
Created November 20, 2022 00:04 — forked from igorjs/rest-api-response-format.md
REST API response format based on some of the best practices
@luismts
luismts / docker_aliases.sh
Created July 19, 2022 19:21
Create docker-compose & docker aliases
#!/bin/bash
echo "
----Commands aliases for Docker Compose
alias dc='docker-compose'
alias dcps='docker-compose ps'
alias dcstart='docker-compose start'
alias dcstop='docker-compose stop'
alias dcup='docker-compose up -d'
----Commands aliases for Docker
@luismts
luismts / Elementor Price Table Align Height
Created March 30, 2022 12:07 — forked from diggeddy/Elementor Price Table Align Height
Force same height on all pricing tables in a row and push footer to bottom
.elementor-widget-price-table, .elementor-widget-price-table>div, .elementor-price-table {
height: 100%;
}
.elementor-price-table {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
@luismts
luismts / AzulPaymentGateway.php
Created December 16, 2021 05:15 — forked from lupena/AzulPaymentGateway.php
Class to handle Azul Payment Gateway Methods / Banco Popular Dominicano BPD / Azul.com.do
/**
* PHP version 5
* @package AzulPaymentGateway
* @author ideologic SRL <touch@ideologic.do>
* @since File available since Release 1
*/
<?php namespace App;
// use Illuminate\Database\Eloquent\Model;
// use DB;
@luismts
luismts / delete_git_submodule.md
Created August 13, 2021 14:53 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@luismts
luismts / BindableScrollableStackLayout.xaml
Created July 15, 2021 22:44 — forked from TrueGeek/BindableScrollableStackLayout.xaml
Xamarin Forms Bindable Scrollable StackLayout
<?xml version="1.0" encoding="UTF-8"?>
<ScrollView
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Project.Controls.BindableScrollableStackLayout">
<StackLayout x:Name="stackLayout" />
</ScrollView>
@luismts
luismts / ObjectMapper.cs
Created December 27, 2020 02:25 — forked from yemrekeskin/ObjectMapper.cs
using Automapper vs Custom Object Mapper(with reflection) for data transformation of objects
public class BaseModel
{
public Guid Id { get; set; }
public DateTime CreateDate { get; set; }
public bool IsActive { get; set; }
public string LastUpdatingUserName { get; set; }
public DateTime LastUpdatingDate { get; set; }
}