Skip to content

Instantly share code, notes, and snippets.

View bowman2001's full-sized avatar
💭
I may be slow to respond, just started a full-time job.

Georg Makowski bowman2001

💭
I may be slow to respond, just started a full-time job.
View GitHub Profile
@bep
bep / hugo-on-android.md
Last active April 26, 2024 04:13
Run Hugo on an Android phone

First install Termux

Then there are two options:

Build from source

Open the Termux terminal on your Android device and copy-and-paste the commands listed below and hit ENTER:

@xeoncross
xeoncross / clean_html.php
Created March 8, 2013 17:28
Sanitize HTML using PHP and the DOMDocument
<?php
/**
* Clean HTML string removing all element attributes and elements which are
* not in the provided whitelist (but keeping their allowed children).
*
* @see https://github.com/alixaxel/phunction/blob/master/phunction/HTML.php
* @param string $html to clean
* @param array $whitelist
*/
function clean_html($html, array $whitelist)