Skip to content

Instantly share code, notes, and snippets.

View ademers's full-sized avatar
🧡

Andrea ademers

🧡
View GitHub Profile
@burkeholland
burkeholland / prd.md
Created April 10, 2025 19:50
TheUrlist PRD

Project Requirements Document: The Urlist Website

The following table outlines the detailed functional requirements of The Urlist website.

Requirement ID Description User Story Expected Behavior/Outcome
FR001 Creating a New URL List As a user, I want to be able to start a new, empty list so I can begin adding URLs. The system should provide a clear way for the user to initiate the creation of a new list, potentially presenting an empty list view or an "add new list" button.
FR002 A
@danhollick
danhollick / tailwind-css-v4.mdc
Last active May 9, 2025 03:54
Cursor rules file for Tailwind CSS v4.0
// Update globs depending on your framework
---
name: tailwind_v4
description: Guide for using Tailwind CSS v4 instead of v3.x
globs: ["**/*.{js,ts,jsx,tsx,mdx,css}"]
tags:
- tailwind
- css
---
@m-ostadi
m-ostadi / regex.txt
Created July 1, 2022 13:43
regex for adding tailwind prefix to existing tailwind classes
in your editor (i used phpstorm ctrl+shift+f for find and replace in all files of a specific folder):
find : (?<=class=["'][^"']*)([0-9a-zA-Z_-]+\s*)(?=[^"']*["'])
replace : tw-$1
@aaronbushnell
aaronbushnell / README.md
Last active February 1, 2024 20:48
🗓 Setting up omnilight/yii2-scheduling for flexible Craft task scheduling

📦 Installation

  1. Run composer require omnilight/yii2-scheduling to install the scheduling package
  2. Setup a config/schedule.php file to house your scheduled processes
  3. Modify your config/app.php to include the schedule component details to run the Craft command (instead of yii)
  4. Run php craft schedule/run --scheduleFile=@config/schedule.php to process any scheduled operations.

💡 Tip: You likely want to run php craft schedule/run --scheduleFile=@config/schedule.php on a cron job that fires every minute!

🙏 Credits

@mattstein
mattstein / db-test.php
Last active December 19, 2024 09:13
PHP MySQL/PostgreSQL Connection Test
<?php
/**
* Database Connection Tester
* A quick-and-dirty standalone script for checking PHP’s connection to a
* MySQL (or MariaDB) or PostgreSQL database.
*
* To use, enter the settings below and run the following from your terminal:
* ```
* php -f db-test.php
@gilbertsoft
gilbertsoft / Dockerfile
Last active March 3, 2023 23:31
Easy change ImageMagick configuration to allow more file types in DDEV, add this two files to .ddev/web-build/
# Change default ImageMagick configuration to allow additional file types
ARG BASE_IMAGE
FROM $BASE_IMAGE
ADD policy.xml /etc/ImageMagick-6/policy.xml
<?php
namespace Deployer;
require 'recipe/common.php';
require 'recipe/rsync.php';
set('application', 'workingconcept/wrkcpt-craft');
set('repository', 'https://github.com/workingconcept/wrkcpt-craft');
$shared = [
name: Forge Deploy
on:
push:
branches:
# - master
- develop
jobs:
deploy:
@terryupton
terryupton / modal.twig
Last active March 31, 2025 09:55
Ajax Loading a page into a modal with Alpine JS
<section x-data="{showModal: false, showLoading: false, html: ''}">
<button
@click="html='loading...'; showLoading = true; showModal = !showModal;
fetch('{{ entry.url }}', {
method: 'GET',
headers: {
'X-Requested-With': 'XMLHttpRequest',
},
})
@daltonrooney
daltonrooney / form.js
Last active September 24, 2019 19:03
Craft CMS + Mailchimp signup form in Vue.js
import Vue from 'vue'
import axios from 'axios'
const apiClient = axios.create({
baseURL: '',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
}
})