Skip to content

Instantly share code, notes, and snippets.

View CamKem's full-sized avatar
🔥
Building....

Cam Kemshal-Bell CamKem

🔥
Building....
View GitHub Profile
@CamKem
CamKem / Markdown.php
Last active October 18, 2025 00:34
Blade in markdown
<?php
declare(strict_types=1);
namespace App\View\Components;
use Closure;
use Dom\Element;
use Dom\HtmlDocument;
use Illuminate\Support\Facades\Blade;
@CamKem
CamKem / Instructions.MD
Created February 21, 2025 13:03 — forked from diogogpinto/Instructions.MD
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:

@CamKem
CamKem / Code.php
Last active January 30, 2025 12:10
blade in markdown
<?php
namespace App\View\Components;
use Closure;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Str;
use Illuminate\View\Component;
use Illuminate\View\ComponentSlot;
<?php
declare(strict_types=1);
use App\Services\MetaData;
use Illuminate\Http\Client\ConnectionException;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Str;
# SETUP #
DOMAIN=example.com
PROJECT_REPO="[email protected]:example.com/app.git"
AMOUNT_KEEP_RELEASES=5
RELEASE_NAME=$(date +%s--%Y_%m_%d--%H_%M_%S)
RELEASES_DIRECTORY=~/$DOMAIN/releases
DEPLOYMENT_DIRECTORY=$RELEASES_DIRECTORY/$RELEASE_NAME
# stop script on error signal (-e) and undefined variables (-u)
@CamKem
CamKem / index.html
Created July 26, 2024 11:05 — forked from redgeoff/index.html
Image Paste Textarea
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Paste Image Example</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.4.6/bluebird.min.js"></script>
</head>
<body>
@CamKem
CamKem / copy-code.js
Created July 13, 2024 12:01
playing around
const copyCode = () => ({
codeElements: [],
init() {
this.codeElements = this.$el.querySelectorAll('code');
this.addCopyButtons();
this.mutate();
},
Subject: [PATCH] feat(hashtags): add hashtag controller & parseable provider
---
Index: app/Services/ParsableContent.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/Services/ParsableContent.php b/app/Services/ParsableContent.php
--- a/app/Services/ParsableContent.php (revision bbb50cf7f4d0053a4c1ae2d1daf3cef7fbd71497)
+++ b/app/Services/ParsableContent.php (date 1720505326881)
@CamKem
CamKem / domtemplate.php
Created June 16, 2024 05:00 — forked from Kroc/domtemplate.php
DOM Template Class
<?php
//DOM Templating classes v7 © copyright (cc-by) Kroc Camen 2012
//you may do whatever you want with this code as long as you give credit
//documentation at http://camendesign.com/dom_templating
class DOMTemplate extends DOMTemplateNode {
private $DOMDocument;
private $keep_prolog = false;
@CamKem
CamKem / QueryBuilder.php
Created May 19, 2024 08:12 — forked from ghassani/QueryBuilder.php
Simple PHP SQL Query Builder for PDO
<?php
class QueryBuilder {
const QUERY_SELECT = 1;
const QUERY_INSERT = 2;
const QUERY_UPDATE = 3;
const QUERY_DELETE = 4;
const QUERY_REPLACE = 5;
const PARAMETER_STRING = 1;