Skip to content

Instantly share code, notes, and snippets.

View smitmartijn's full-sized avatar

Martijn Smit smitmartijn

View GitHub Profile
@smitmartijn
smitmartijn / diff.patch
Created April 14, 2026 07:10
feat/resize-reply-box
commit 9b345578e1a0ce75533cc8970d990b95f369119a
Author: Martijn Smit <[email protected]>
Date: Thu Feb 19 16:35:48 2026 +0100
feat: add drag-to-resize handle for the reply box editor
diff --git a/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue b/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue
index bc0b6c9461..2f272f0d8c 100644
--- a/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue
+++ b/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue
services:
postiz:
image: ghcr.io/gitroomhq/postiz-app:latest
container_name: postiz
restart: always
env_file: ".env"
volumes:
- postiz-config:/config/
- postiz-uploads:/uploads/
<?php
namespace App\Listeners;
use Laravel\Paddle\Events\WebhookReceived;
use App\Models\User;
use Laravel\Paddle\Cashier;
use Illuminate\Support\Facades\Log;
class HandleWebhookReceived

GitHub Copilot Custom Instructions for Qt C++ & WhatPulse Desktop App

These instructions guide Copilot to generate code that aligns with modern Qt C++ standards, C++20/23 features, software engineering principles, and industry best practices to improve software quality, maintainability, and performance for the WhatPulse desktop application.

✅ General C++ Coding Standards

  • Follow Google C++ Style Guide or Core Guidelines for consistent code structure
  • Use meaningful, descriptive variable, function, class, and file names
  • Apply proper Doxygen comments for classes, methods, and complex logic
  • Organize code into small, reusable functions or classes with single responsibility

GitHub Copilot Custom Instructions for Laravel 12 & PHP 8.2/8.4

These instructions guide Copilot to generate code that aligns with modern Laravel 12 standards, PHP 8.2/8.4 features, software engineering principles, and industry best practices to improve software quality, maintainability, and security.

✅ General Coding Standards

  • Follow PSR-12 coding style and structure.
  • Prefer short, expressive, and readable code.
  • Use meaningful, descriptive variable, function, class, and file names.
  • Apply proper PHPDoc blocks for classes, methods, and complex logic.
# Nuclear restart of SSHD and all connections
$sshConnections = Get-NetTCPConnection -LocalPort 22 -State Established -ErrorAction SilentlyContinue
Stop-Service sshd
foreach ($conn in $sshConnections) {
$process = Get-Process -Id $conn.OwningProcess -ErrorAction SilentlyContinue
if ($process) {
Stop-Process -Id $process.Id -Force
}
const fullTextRaw = $json["body"]["text"] || "";
const fullText = fullTextRaw.trim(); // remove leading/trailing whitespace
const lines = fullText.split('\n').map(line => line.trim());
// Look for lines
const summaryLine = lines.find(line => line.includes("Cloudflare Pages:"));
const commitLine = lines.find(line => line.startsWith("Commit Hash:"));
const envLine = lines.find(line => line.startsWith("Environment:"));
// If any line is missing, exit the workflow
function Compare-XmlContent {
param (
[Parameter(Mandatory=$true)]
[string]$FirstXml,
[Parameter(Mandatory=$true)]
[string]$SecondXml,
[Parameter(Mandatory=$false)]
[switch]$IgnoreWhitespace,
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = [ "canvas" ]
static values = {
numberOfRows: Number,
labels: Array,
data: Array
}
chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) {
if (message.action === "googleMeetBringToFront") {
chrome.tabs.query({}, function (tabs) {
let meetFound = false;
for (let i = 0; i < tabs.length; i++) {
if (tabs[i].url.includes('meet.google.com')) {
meetFound = true;
chrome.tabs.update(tabs[i].id, { selected: true });
chrome.windows.update(tabs[i].windowId, { focused: true });