Skip to content

Instantly share code, notes, and snippets.

View leandrohago's full-sized avatar

Leandro Henrique Agostinho leandrohago

View GitHub Profile
@leandrohago
leandrohago / switch_env.sh
Last active August 18, 2025 17:52
Switch env
#!/bin/bash
# Define as cores ANSI
# Cor de fundo verde
BG_GREEN='\033[42m'
# Cor de texto padrão
DEFAULT_COLOR='\033[0m'
# Define o nome do arquivo de destino
DEST_FILE=".env"
@leandrohago
leandrohago / change.md
Created September 23, 2024 13:58
chrome changing mic volume

This solution is specific to the Google Chrome browser:

  1. Goto chrome://flags in your browser's URL input.
  2. Search for microphone
  3. For the option labeled Allow WebRTC to adjust the input volume, change the value of the dropdown from Default to Disabled.
### Step-by-Step Guide
1. **Check for Active Connections:**
- Use `nmcli` to list active connections and identify the correct connection name:
```bash
nmcli connection show
```
2. **Edit the Connection Profile via nmcli:**
@leandrohago
leandrohago / define_default_sound_device.md
Created July 31, 2024 14:15
Definir dispositivo de áudio padrão

Lista dispositivos de saída de áudio

pactl list short sinks

Mostra dispositivo padrão de saída de áudio

pactl get-default-sink

Lista dispositivos de entrada de áudio

@leandrohago
leandrohago / RemoveWhereColumns.php
Created January 19, 2024 13:44
Scope to remove where columns from eloquent query builder
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
class YourModel extends Model
{
public function scopeRemoveWhereColumns(Builder $builder, array $whereColumns): void
@leandrohago
leandrohago / CallRoute.php
Last active December 28, 2021 22:09
Call route using php artisan
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Http\Request;
class CallRoute extends Command
{
/**
@leandrohago
leandrohago / callStoreProcedure.php
Last active December 28, 2021 22:05
Function to access multiple results from Stored Procedure
<?php
/**
*
* Function to access multiple results from Stored Procedure
* https://stackoverflow.com/a/28043584
* @param $procName
* @param array $parameters
* @param string $connection
* @param false $isExecute
@leandrohago
leandrohago / start_env.bat
Last active April 15, 2021 20:48
Script para (Iniciar - Parar - Reiniciar) os serviços em ambiente local
@echo OFF
REM ###############################################################################
REM 18/03/2021
REM Leandro H Agostinho
REM Script para
REM - Iniciar
REM - Parar
REM - Reiniciar
REM os serviços em ambiente local - V2