This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
description: Guidelines and best practices for creating .mdc (Markdown Configuration) files in Cursor, including structure, metadata annotations, and formatting rules | |
globs: ["**/*.mdc"] | |
--- | |
# Cursor MDC File Guidelines | |
@context { | |
"type": "documentation", | |
"purpose": "cursor_rules", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Function to convert Hex colors to RGBA | |
function hex2rgba( $color, $opacity = false ) { | |
$defaultColor = 'rgb(0,0,0)'; | |
// Return default color if no color provided | |
if ( empty( $color ) ) { | |
return $defaultColor; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
// Load plugins | |
const autoprefixer = require("autoprefixer"); | |
const browsersync = require("browser-sync").create(); | |
const cp = require("child_process"); | |
const cssnano = require("cssnano"); | |
const del = require("del"); | |
const eslint = require("gulp-eslint"); | |
const gulp = require("gulp"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*======================================================================== | |
Filter wp_list_categories to add new attribute | |
========================================================================*/ | |
add_filter('wp_list_categories','moons_ajax_onclick'); | |
function moons_ajax_onclick($output){ | |
//if (is_post_type_archive('crew')) { // localize this filter if needed | |
//if not using a CPT then change get_terms to get_categories |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Load More for Masonry modification | |
* | |
* Full post: | |
* http://www.billerickson.net/infinite-scroll-in-wordpress/ | |
* | |
*/ | |
jQuery(function($){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** ==================================================================================== | |
* Functions file | |
==================================================================================== **/ | |
function yourthemeprefix_yourcpt_metabox_register() { | |
$prefix = '_cmb_'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php /* Don't include this line if your child theme functions.php already includes it */ | |
function my_et_divi_output_content_wrapper_end() { | |
echo '</div> <!-- #left-area -->'; | |
if ( | |
( is_product() && 'et_full_width_page' !== get_post_meta( get_the_ID(), '_et_pb_page_layout', true ) ) | |
|| | |
( ( is_shop() || is_product_category() || is_product_tag() ) && 'et_full_width_page' !== et_get_option( 'divi_shop_page_sidebar', 'et_right_sidebar' ) ) | |
) { | |
dynamic_sidebar( 'eCommerce Sidebar' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Terminal Cheat Sheet | |
pwd # print working directory | |
ls # list files in directory | |
cd # change directory | |
~ # home directory | |
.. # up one directory | |
- # previous working directory | |
help # get help | |
-h # get help |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* World's simplest express server | |
* - used to serve index.html from /public | |
*/ | |
var express = require('express'); | |
var serveStatic = require('serve-static'); | |
var app = express(); | |
app.use(serveStatic(__dirname + '/public')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag | |
//* Enqueue Animate.CSS and WOW.js | |
add_action( 'wp_enqueue_scripts', 'sk_enqueue_scripts' ); | |
function sk_enqueue_scripts() { | |
wp_enqueue_style( 'animate', get_stylesheet_directory_uri() . '/css/animate.min.css' ); | |
wp_enqueue_script( 'wow', get_stylesheet_directory_uri() . '/js/wow.min.js', array(), '', true ); |
NewerOlder