Skip to content

Instantly share code, notes, and snippets.

View alinademi's full-sized avatar

Ali Demi alinademi

  • Vancouver
View GitHub Profile
@halofx
halofx / SassMeister-input.scss
Last active August 13, 2020 07:35
Responsive Font Size with Sass Maps
// ----
// libsass (v3.2.5)
// From https://www.smashingmagazine.com/2015/06/responsive-typography-with-sass-maps/
// ----
// Breakpoint values for min-width operators.
$breakpoints: (
small : 480px,
medium: 700px,
large : 1024px
@morgyface
morgyface / functions_custom-cols.php
Last active April 25, 2025 13:46
WordPress | Advanced Custom Fields | Create custom columns within admin for a custom post type using ACF
<?php
// Change the columns for the releases list screen
function change_columns( $cols ) {
$cols = array(
'cb' => '<input type="checkbox" />',
'featimg' => 'Featured Image',
'excerpt' => 'Excerpt?',
'title' => 'Title',
'artist' => 'Artist',
'catno' => 'Cat#',
@gemmadlou
gemmadlou / remove-visual-composer-shortcodes.md
Last active October 16, 2024 00:28
Removing Visual Composer & Shortcodes From Wordpress Content

Adding @k1sul1's suggestion from the comments as it's more concise than what I had before:

I just wanted them all gone, so I ran this in the MySQL shell.

UPDATE wp_posts SET post_content = REGEXP_REPLACE(post_content, "\\[\/?vc(.*?)\]", "");

Note the double backslash. If you forget it, you'll replace all v's and c's with nothing, and the shortcodes will still be there. This works for other shortcode as well, just replace vc.

@wpscholar
wpscholar / rss-to-json.php
Last active January 29, 2021 01:41
A simple must-use plugin for WordPress that will provide a `/feed/json` endpoint for converting RSS feeds to JSON.
<?php
/**
* A simple must-use plugin for WordPress that will provide a `/feed/json` endpoint for converting RSS feeds to JSON.
* In the absence of any URL parameters, it will convert the main feed to JSON. If a URL is set, it will convert the
* feed from that URL into JSON. If a callback is set, a JSONP implementation will be returned.
*
* Note: Be sure to flush rewrite rules manually by visiting the 'General'->'Permalinks' page in the WordPress admin. If
* you are using this in a plugin, be sure to flush the rewrite rules on activation using the 'flush_rewrite_rules()' function.
*
@BrianSipple
BrianSipple / spacing-utilities.css
Last active August 30, 2024 15:51
CSS Spacing Utilities
@import "../variables/_spacing.css";
/*
* SPACING UTILITIES
*
* Utilities for setting padding and margin.
*
* Legend:
*
* Rules:
@igorbenic
igorbenic / example.php
Last active February 21, 2024 21:32
Taxonomy Rewrite Example
<?php
function rewriting_resources($wp_rewrite) {
$rules = array();
$terms = get_terms( array(
'taxonomy' => 'resource_type',
'hide_empty' => false,
) );
$post_type = 'resources';
@amboutwe
amboutwe / yoast_seo_breadcrumb_add_woo_shop.php
Last active September 17, 2025 12:07
Multiple examples of how to customize the Yoast SEO breadcrumbs
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/*
* Add shop link to the Yoast SEO breadcrumbs for a WooCommerce shop page.
* Credit: https://wordpress.stackexchange.com/users/8495/rjb
* Last Tested: Apr 20 2017 using Yoast SEO 4.6 on WordPress 4.7.3
*/
add_filter( 'wpseo_breadcrumb_links', 'wpseo_breadcrumb_add_woo_shop_link' );
@bigsergey
bigsergey / review-checklist.md
Last active January 11, 2026 19:23
Front-end Code Review Checklist

Review checklist

General

  1. Does the code work?
  2. Description of the project status is included.
  3. Code is easily understand.
  4. Code is written following the coding standarts/guidelines (React in our case).
  5. Code is in sync with existing code patterns/technologies.
  6. DRY. Is the same code duplicated more than twice?
@sarahdayan
sarahdayan / modifiers.scss
Last active November 15, 2024 15:56
Sass Modifiers Mixin
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
// Sass modifiers mixin by Sarah Dayan
// Generate All Your Utility Classes with Sass Maps: frontstuff.io/generate-all-your-utility-classes-with-sass-maps
// http://frontstuff.io
// https://github.com/sarahdayan
@steven2358
steven2358 / ffmpeg.md
Last active January 21, 2026 19:58
FFmpeg cheat sheet