Skip to content

Instantly share code, notes, and snippets.

View lpheller's full-sized avatar
🖥️

Lukas Heller lpheller

🖥️
View GitHub Profile
@lpheller
lpheller / RunDevCommand.php
Created September 6, 2024 12:24
Laravel Command to run multiple local dev related commands with one call
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Process;
use Symfony\Component\Console\Command\SignalableCommandInterface;
class RunDevCommand extends Command implements SignalableCommandInterface
{
@lpheller
lpheller / check.php
Last active October 4, 2023 11:48
Zero dependency quick check for missing keys within the .env.example
<?php
function getEnvVariablesFrom($filepath){
$envContent = file_get_contents($filepath);
$envVariables = array_filter(
explode("\n", $envContent), function($value){
return str_contains($value, "=")
&& $value !== ''
&& !str_starts_with($value, "#");
@lpheller
lpheller / tldr-global-gitignore-ds-store.sh
Created November 11, 2020 08:51
Globally ignore .DS_Store files
# Quick and easy one line command to setup a global .gitignore file and ignore macOS .DS_store files globally
git config --global core.excludesfile "~/.gitignore" && echo .DS_Store >> ~/.gitignore
@lpheller
lpheller / .php_cs
Created October 16, 2020 08:36
php_cs file
<?php
$styleCiLaravel = [
'phpdoc_align' => ['align' => 'vertical'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'array_indentation' => true,
'binary_operator_spaces' => [
'default' => 'single_space',
'operators' => ['=>' => 'align_single_space_minimal'],
],