Skip to content

Instantly share code, notes, and snippets.

View ArondeParon's full-sized avatar
🤓

Aron Rotteveel ArondeParon

🤓
View GitHub Profile
@ArondeParon
ArondeParon / ValidateAtLeastOne.php
Created July 14, 2016 08:22
Laraval Custom Validator to validate that at least one item in an array is filled
Validator::extend('at_least_one_filled', function($attribute, $value, $parameters, $validator) {
if (is_array($value)) {
$filteredArray = array_filter($value);
return count($filteredArray) > 0;
} else {
return !empty($value);
}
});
@ArondeParon
ArondeParon / gist:5b844c9fa5c85ca3f6f30507b659dcb6
Created December 12, 2018 09:34
Turn off dark mode for Microsoft Office on Mac
# So, Microsoft made their Office suite dark-mode compatible, sort of.
# Thing is, it looks absolutely terrible and there is no simple way to turn it off.
# Oh wait, there is! Paste these commands in your terminal to excempt the app from Dark Mode in Mac OS.
defaults write com.microsoft.Excel NSRequiresAquaSystemAppearance -bool yes
defaults write com.microsoft.Word NSRequiresAquaSystemAppearance -bool yes
defaults write com.microsoft.Outlook NSRequiresAquaSystemAppearance -bool yes
defaults write com.microsoft.Powerpoint NSRequiresAquaSystemAppearance -bool yes
@ArondeParon
ArondeParon / ThemosisValetDriver.php
Created June 2, 2020 15:40
Themosis Laravel Valet Driver
<?php
class ThemosisValetDriver extends BasicValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri