Skip to content

Instantly share code, notes, and snippets.

View lpheller's full-sized avatar
🖥️

Lukas Heller lpheller

🖥️
View GitHub Profile
@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'],
],