Skip to content

Instantly share code, notes, and snippets.

@AVGP
AVGP / index.html
Created December 3, 2018 20:37
Stupidest, simplest JS web app ever
<!doctype html>
<html lang="en">
<head>
<title>Kitten Corner</title>
<meta charset="utf-8">
<meta name="description" content="Kitten Corner has a bunch of lovely cat pictures ready for you!">
<meta name="viewport" content="width=device-width">
<style>
body {
@AVGP
AVGP / dms.xml
Last active October 2, 2020 14:02
UPnP test server (incomplete)
<?xml version="1.0" encoding="utf-8"?>
<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:dlna="urn:schemas-dlna-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<dlna:X_DLNADOC>DMR-1.50</dlna:X_DLNADOC>
<deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
<friendlyName>YoloCast</friendlyName>
<?php
if( !empty( $_POST ) ) {
die( "data: " . $_POST["msg"] );
}
?>
<form method="post">
<button type="button">Go</button>
</form>
@AVGP
AVGP / robots-rule-matching.js
Created September 8, 2021 14:57
Experimental code to match robots.txt rules against a given path.
const patterns = [
/*
'/path/yolo.png',
'/path',
'/something',
'/path/hello.png$',
'/path/hello$',
'/a*bc'
*/
'/a*a'
@AVGP
AVGP / json-ldfy.php
Last active December 20, 2023 13:20
A barebones WP plugin to add JSON-LD based on post data automatically. It won't really work, but it's a starting point for exploration.
<?php
/*
Plugin Name: JSON-LDfy
Plugin URI: https://www.google.com
Description: Add JSON-LD based on some post data
Version: 1.0
Author: Martin Splitt
Author URI: https://www.google.com
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html