Skip to content

Instantly share code, notes, and snippets.

View ezequidias's full-sized avatar

Ezequiel D. ezequidias

View GitHub Profile
@MrPunyapal
MrPunyapal / LaravelWhereLikeMacro.php
Last active August 5, 2024 08:24
Laravel Custom 'whereLike' Macro for Dynamic 'LIKE' Searches including relationships
<?php
namespace App\Providers;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Arr;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
@luizomf
luizomf / ambiente-dev-ubuntu-curso-python.sh
Created October 31, 2022 01:23
Instalação ambiente dev Ubuntu 22 do curso de Python
#!/bin/bash
# Executar comandos a seguir para atualizar os pacotes
sudo apt update -y
sudo apt upgrade -y
# Só o Python
sudo apt install python3.10-full python3.10-dev -y
# Instalar pacotes a seguir
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 9, 2025 16:57
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@rodrigopedra
rodrigopedra / gist:a4a91948bd41617a9b1a
Last active January 18, 2025 23:52
Laravel 5 Middleware for Database Transactions
<?php namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Response;
class DBTransaction
{
/**
* Handle an incoming request.
*
@rdeavila
rdeavila / pgsql-size.sql
Last active December 4, 2024 20:02
PostgreSQL: Como ver o tamanho das bases de dados de um servidor
-- Para saber o tamanho de todas as bases de dados:
SELECT pg_database.datname, pg_size_pretty(pg_database_size(pg_database.datname)) AS size FROM pg_database;