Skip to content

Instantly share code, notes, and snippets.

View joelmellon's full-sized avatar

Joel Mellon joelmellon

View GitHub Profile
@ameenross
ameenross / AppServiceProvider.php
Last active October 23, 2021 21:41
Laravel "forbidden" validation: fail validation when an attribute is in the request
<?php
class AppServiceProvider
{
public function boot()
{
// The closure will only be called if the attribute is in the request.
Validator::extend('forbidden', function ($attribute, $value, $parameters) {
// Always return false.
return false;
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 2, 2024 16:19
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@zdne
zdne / Google Chrome Incognito.applescript
Last active January 31, 2023 19:38
Google Chrome Incognito – AppleScript to always run chrome in incognito mode. Save as an application to your Application folder. Optionally drag a and drop Google Chrome Icon in between Get Info panes (⌘+I)
if application "Google Chrome" is running then
tell application "Google Chrome" to make new window with properties {mode:"incognito"}
else
do shell script "open -a /Applications/Google\\ Chrome.app --args --incognito"
end if
tell application "Google Chrome" to activate