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 / 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;
@CamKem
CamKem / client.php
Last active May 7, 2024 13:12
Terminal Chat Server
<?php
// Client script
$socket = stream_socket_client("tcp://localhost:8000", $errorNumber, $errorMessage);
if (!$socket) {
echo "{$errorMessage} ({$errorNumber})<br />\n";
} else {
stream_set_blocking($socket, false);
$username = readline("Enter your username: ");
@CamKem
CamKem / HandleFollows.php
Last active April 26, 2024 02:05
Laravel Polymorphic Follows System.
<?php
declare(strict_types=1);
// For code organisation, goes on the user model.
namespace App\Concerns;
use App\Models\Follow;
use Illuminate\Database\Eloquent\Model;
@CamKem
CamKem / PhpStorm Errors
Created April 5, 2024 03:32
PhpStorm Errors
Images

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@CamKem
CamKem / FlashMessage.vue
Last active March 4, 2024 14:12
Popup Flash Messages for VueJS
<template>
<teleport to="body">
<Transition
enter-active-class="transition duration-300 ease-in-out"
enter-from-class="translate-y-12 scale-75 opacity-0 ease-in-out"
enter-to-class="scale-100 opacity-100 ease-in-out"
leave-active-class="transition duration-300 ease-in-out"
leave-from-class="translate-y-0 scale-100 opacity-100 ease-in-out"
leave-to-class="translate-y-12 scale-75 opacity-0 ease-in-out"
>