Skip to content

Instantly share code, notes, and snippets.

View abr4xas's full-sized avatar
🐧
Focusing

ángel abr4xas

🐧
Focusing
View GitHub Profile
@wilsenhc
wilsenhc / composer-upgrader.yml
Created January 29, 2025 19:12
Composer auto-update
name: Automatic composer upgrade
on:
schedule:
- cron: '0 12 1 * *'
jobs:
types:
runs-on: ubuntu-24.04
@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:

@babacarcissedia
babacarcissedia / google-recaptcha.md
Last active February 9, 2024 01:41
Add google recaptcha to website

Opinionated code Laravel code for adding recaptcha on website. Bot protection especially on open form (without user authentication)

  1. Create blade component for ease of reuse
resources/views/components/input/captcha.blade.php

@props([
    'id',
    'name',
@nielspeen
nielspeen / ConversionService.php
Created August 13, 2023 10:23
Measure conversions using Laravel Pennant
<?php
namespace App\Services;
/*
* A thin layer on top of Laravel Pennant to track conversions.
*/
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
@pagelab
pagelab / wp_remote_get_with_cache.php
Created October 19, 2021 00:50 — forked from msaari/wp_remote_get_with_cache.php
wp_remote_get_with_cache – Fetches remote data with dual-layer caching
<?php
/**
* Fetches remote data with dual-layer caching.
*
* Uses wp_remote_get to fetch remote data. The data is cached twice: it's
* stored in a transient and an option. The transient is used as the main cache
* but if the transient has expired and the remote site doesn't respond,
* backup data from the option is returned.
*
@owenconti
owenconti / 5ec339ed59c37.html
Created May 19, 2020 01:44
Moving our search drop down from Algolia to Alpine.js
<div class="relative">
<div id="#search-box"></div>
<div id="#hits"></div>
</div>
@Villanuevand
Villanuevand / README-español.md
Last active April 6, 2025 23:20
Una plantilla para hacer un buen README.md. Inspirado en el gist de @PurpleBooth => https://gist.github.com/PurpleBooth/109311bb0361f32d87a2

Título del Proyecto

Acá va un párrafo que describa lo que es el proyecto

Comenzando 🚀

Estas instrucciones te permitirán obtener una copia del proyecto en funcionamiento en tu máquina local para propósitos de desarrollo y pruebas.

Mira Deployment para conocer como desplegar el proyecto.

@m2sh
m2sh / DOSpacesStorageServiceProvider.php
Last active January 17, 2024 05:03
How To Use Digitalocean Spaces as Laravel Cloud filesystems
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Aws\S3\S3Client;
use League\Flysystem\AwsS3v3\AwsS3Adapter;
use League\Flysystem\Filesystem;
use Storage;
@campoy
campoy / settings.json
Created July 24, 2017 21:11
My vscode settings
{
"window.zoomLevel": 0,
"go.lintOnSave": "package",
"editor.fontFamily": "'Fira Code', Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": false,
"workbench.iconTheme": "vs-seti",
"go.addTags": {
"tags": "json",
"options": "json=omitempty",
"promptForTags": true,
@maheshwaghmare
maheshwaghmare / create-post-by-using-wp_remote_post.php
Last active April 4, 2021 06:23
Create post using wp_remote_post() function in WordPress. Required plugin https://github.com/WP-API/Basic-Auth
<?php
/**
* NOTE: Required plugin https://github.com/WP-API/Basic-Auth to install and activate on the same site.
* It works on same site.
*/
// API Details.
$rest_url = 'http://{MY_SITE}/wp-json/wp/v2/posts';
$username = 'my-username';