This guide is created to make work with labels on Github more constructive and understandable both to development and management parts of the team.
Here's the base sanitizer:
<?php
namespace FooProject\Internal\Sanitizers;
abstract class BaseSanitizer
{
/**
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// OpenSSL PHP Extension | |
// PDO PHP Extension | |
// Mbstring PHP Extension | |
// Tokenizer PHP Extension | |
// XML PHP Extension | |
// SQLite PHP Extension (for SQLite3 support) | |
$extensionsList = [ |
Based on thephpleague Definition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| Remove Laravel Comments | |
|-------------------------------------------------------------------------- | |
| | |
| Just made a new Laravel project, but don't want all those big | |
| comment blocks? Put this in the root of your project and run | |
| "php remove_laravel_comments.php" | |
| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "name/example", | |
"description": "demo", | |
"type": "project", | |
"license": "MIT", | |
"authors": [ | |
{ | |
"name": "Your Name", | |
"email": "[email protected]" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createTransport } from "nodemailer"; | |
const smtpConnection = createTransport({ | |
host: "smtp-relay.sendinblue.com", | |
port: 587, | |
auth: { | |
user: process.env.SMTP_USER || "", | |
pass: process.env.SMTP_PASSWORD || "", | |
}, | |
}); |
Warning: HTML form validation is not a substitute for server-side scripts that ensure the entered data is in the proper format before it is allowed into the database. It's far too easy for someone to make adjustments to the HTML that allow them to bypass the validation, or to remove it entirely. It's also possible for someone to bypass your HTML entirely and submit the data directly to your server. If your server-side code fails to validate the data it receives, disaster could strike when improperly-formatted data (or data which is too large, is of the wrong type, and so forth) is entered into your database.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const validateEmail = (email: string) => { | |
const re = | |
/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; | |
return re.test(String(email).toLowerCase()); | |
}; | |
const ifElse = (condition: boolean, ifTrue: any, ifFalse: any) => { | |
return condition ? ifTrue : ifFalse; | |
}; |