Skip to content

Instantly share code, notes, and snippets.

View vitorjustin's full-sized avatar

Vitor Justin vitorjustin

View GitHub Profile
@luizbills
luizbills / code.php
Last active September 19, 2023 16:37
Add some security-related headers to your WordPress. You can check your headers in https://securityheaders.com/
<?php
add_action( 'wp_headers', 'lpb_add_security_headers' );
function lpb_add_security_headers ( $headers ) {
$headers['Strict-Transport-Security'] = 'max-age=31536000; includeSubDomains; preload';
$headers['X-Content-Type-Options'] = 'nosniff';
$headers['X-XSS-Protection'] = '1; mode=block';
$headers['Content-Security-Policy'] = "default-src 'self'; connect-src *; font-src * data:; frame-src *; img-src * data:; media-src *; object-src *; script-src * 'unsafe-inline' 'unsafe-eval'; style-src * 'unsafe-inline'";
return $headers;
}
@diogogpinto
diogogpinto / Instructions.MD
Created January 3, 2025 13:14
Best Laravel AI Prompt to use with Claude

I have been utilizing artificial intelligence to enhance and optimize my codebases. After evaluating various models, applications, and editors, I find the claude.ai interface with a Pro Account to be the most effective. Here’s the approach I’ve developed to achieve optimal results:

This gist contains a carefully crafted prompt and a script designed to convert your entire Laravel codebase (excluding the resources folder, which can be easily added if needed) into a TXT file with the following structure:

<File Start: ./path/filename.extension> Content of file <End File: ./path/filename.extension>

To implement this method: