Skip to content

Instantly share code, notes, and snippets.

View mi5t4n's full-sized avatar
🏠
Working from home

Sagar Tamang mi5t4n

🏠
Working from home
View GitHub Profile
@mi5t4n
mi5t4n / apt-repo-playbook.yaml
Created August 31, 2024 18:40 — forked from roib20/apt-repo-playbook.yaml
Example usages of the new `deb822_repository` Ansible module
---
- hosts: localhost
connection: local
gather_facts: true
tasks:
- name: Add APT repositories
when: ansible_os_family == 'Debian'
become: true
block:
@mi5t4n
mi5t4n / wp_core_setup_local_by_flywheel.sh
Created July 16, 2024 14:18 — forked from mehul0810/wp_core_setup_local_by_flywheel.sh
WordPress Core Development SetUp on Local by FlyWheel
#!/bin/bash
# Welcome to the WP Core Development Wizard.
#
# Author: Mehul Gohil
# Email: hello@mehulgohil.com
# Supports: Local 5.2.8. or later
#
# PreRequisites:
# 1. Install wget, subversion, curl, php5-cli, and git
@mi5t4n
mi5t4n / fix-git-line-endings
Created May 28, 2024 14:04 — forked from ajdruff/fix-git-line-endings
Forces all line endings to LF in your git repo.
#####################
#
# Use this with or without the .gitattributes snippet with this Gist
# create a fixle.sh file, paste this in and run it.
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF)
# This Gist normalizes handling by forcing everything to use Unix style.
#####################
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF
@mi5t4n
mi5t4n / README.md
Created May 14, 2024 04:08 — forked from joemaller/README.md
Fix term counts so wp-admin Taxonomy listings show the correct number of items for the selected post_type.

Fixing post counts for WordPress taxonomies

The problem

For WordPress sites using Custom Post Types, Taxonomy admin listings show cumulative term-assignment totals for all post_types instead of counts specific to the selected post_type. Since Taxonomy listings are always attached to a single post_type, totals for shared taxonomies don't make sense.

The Goal

Fix term counts so wp-admin Taxonomy listings show the correct number of items for the selected post_type.