Skip to content

Instantly share code, notes, and snippets.

View rungta's full-sized avatar

Prateek Rungta rungta

View GitHub Profile
@rungta
rungta / overview.twig
Last active May 19, 2026 06:08 — forked from bencroker/overview.twig
A front-end overview of all sections and category groups in Craft CMS.
<!DOCTYPE html>
<html lang="en">
<head>
<title>CMS Overview</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-100">
{% set sections = craft.app.entries.allSections %}
{% set categoryGroups = craft.app.categories.allGroups %}
@rungta
rungta / jquery.external-links-new-window.js
Last active December 18, 2019 11:49 — forked from wpscholar/jquery.external-links-new-window.js
Open all external links in a new window
@rungta
rungta / parse-youtube-vimeo-urls.php
Last active October 14, 2016 08:11 — forked from cballou/youtube-vimeo-embed-urls.php
Now returns video metadata instead of an embeddable URL
<?php
/**
* Given a string containing any combination of YouTube and Vimeo video URLs in
* a variety of formats (iframe, shortened, etc), each separated by a line break,
* parse the video string and determine it's host and ID.
*
* Data gets returned in the format:
*
* array(
* array(