Skip to content

Instantly share code, notes, and snippets.

View dertuxmalwieder's full-sized avatar
🚾
Wine Connoisseur.

Cthulhux dertuxmalwieder

🚾
Wine Connoisseur.
View GitHub Profile
@ngm
ngm / functions.php
Created March 28, 2019 22:50
Wordpress embed handler for invidio.us
wp_embed_register_handler( 'invidious_watch', '#https?://invidio\.us/watch\?v=([A-Za-z0-9\-_]+)#i', 'wp_embed_handler_invidious' );
wp_embed_register_handler( 'invidious_embed', '#https?://invidio\.us/embed/([A-Za-z0-9\-_]+)#i', 'wp_embed_handler_invidious' );
function wp_embed_handler_invidious( $matches, $attr, $url, $rawattr ) {
$embed = sprintf(
'<iframe src="https://invidio.us/embed/%1$s" frameborder="0" scrolling="no" marginwidth="0" marginheight="0" width="600" height="400"></iframe>',
esc_attr($matches[1])
);
return $embed;
}
@jasom
jasom / rpn.lisp
Created November 19, 2018 23:11
RPN calculator using lisp stack as RPN stack
(defpackage rpn (:use :cl) (:export :rpn))
(defpackage rpn-internal (:export :+ :print))
(in-package :rpn)
(defgeneric rpn-eval (token &optional y))
(defun rpn ()
(rpn-eval (let ((*package* (find-package 'rpn-internal))) (read))))
@ihumanable
ihumanable / Excel.php
Last active February 6, 2024 06:24
Simple Excel Writer in PHP
<?php
/**
* Simple excel writer class with no external dependencies, drop it in and have fun
* @author Matt Nowack
* @link https://gist.github.com/ihumanable/929039/edit
* @license Unlicensed
* @version 1.0
*/
class Excel {