Skip to content

Instantly share code, notes, and snippets.

@royce002
royce002 / wp_taxonomy_exporter.py
Created September 18, 2025 13:54
# WordPress Taxonomy Exporter This Python script parses a standard WordPress XML export file (`.xml`) to extract a complete, unique, and alphabetized list of all categories and post tags.
import xml.etree.ElementTree as ET
import os
def extract_categories_tags_from_wordpress_export(xml_file):
"""
Parses a WordPress XML export file to extract all unique categories and tags.
Args:
xml_file (str): The path to the WordPress XML export file.
{
"basics": {
"name": "Thomas Edison",
"label": "Inventor and Businessman",
"picture": "https://example.com/photo.jpg",
"email": "[email protected]",
"phone": "(123) 456-7890",
"website": "https://thomasedison.com",
"summary": "Prolific inventor and businessman known for developing many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the electric light bulb.",
"location": {
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Royce Redfearn",
"label": "Senior Full-Stack Web Developer",
"email": "[email protected]",
"phone": "(972) 900-0048",
"url": "https://redfearn.co/",
"summary": "Senior Full-Stack Web Developer with over 15+ years of extensive experience in requirements gathering, solution architecture, and robust implementation. Proven expertise across modern frontend (HTML5, CSS3, JavaScript, TypeScript, Vue.js) and backend (PHP, Symfony, Drupal, Node.js, ASP.NET, MySQL, MariaDB) technologies. Adept at API integration (RESTful APIs, SOAP), Git-based version control, SEO, eCommerce, and email marketing. Excels in designing intuitive UI/UX, leading Agile teams as a Scrum Master, and driving significant improvements in web performance, security, and organic traffic. Recognized for writing well-structured, object-oriented code, strong problem-solving abilities, and fostering collab
@royce002
royce002 / install_postman_mint_no_snap.md
Created July 23, 2025 14:20 — forked from prrao87/install_postman_mint_no_snap.md
Install Postman on Linux Mint (without using snap)

Goal

Postman is a usefull app to build and test APIs, most commonly installed on ubuntu-like systems via snap. On recent distributions of Linux Mint (20 and above), snap installs are no longer possible. The instructions below show how to install Postman via the terminal.

Download Postman

$ wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz

Extract archive

$ sudo tar -xzf postman.tar.gz -C /opt

Make symlink

Card UI Skeleton Screen

This creates a skeleton of a card component using CSS custom properties to draw different gradients on the background-image. Skeleton screens can be used to improve perceived performance while loading.

A Pen by Royce Redfearn on CodePen.

License.

font-family: ui-monospace,
Menlo, Monaco,
"Cascadia Mono", "Segoe UI Mono",
"Roboto Mono",
"Oxygen Mono",
"Ubuntu Mono",
"Source Code Pro",
"Fira Mono",
"Droid Sans Mono",
"Consolas", "Courier New", monospace;
@royce002
royce002 / .htaccess
Created June 3, 2022 15:29
Redirect to https and non-www .htaccess
# Canonical HTTPS/non-WWW
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule (.*) https://example.com/$1 [L,R=301]
</IfModule>
@royce002
royce002 / .htaccess
Created March 4, 2021 22:14
.htaccess script to redirect all traffic to https with no wwws.
# Redirect to https and non-www
# Canonical HTTPS/non-WWW
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule (.*) https://example.com/$1 [L,R=301]
</IfModule>
@royce002
royce002 / gsap-week4-scrolling-challenges-june-2020.markdown
Created November 23, 2020 17:55
GSAP - 頁面捲動動畫效果 (week4 scrolling challenges June 2020)

GSAP - 頁面捲動動畫效果 (week4 scrolling challenges June 2020)

利用 GSAP ScrollTrigger Pluging 製作簡單頁面捲動動畫效果

A Pen by RayPan on CodePen.

License.