Skip to content

Instantly share code, notes, and snippets.

View wderuijter's full-sized avatar

Wim de Ruijter wderuijter

View GitHub Profile
//Some HTML
$page = "<html><body><a href="/some/link.html">Link1</a><a href="/another/link">Link2</a></body></html>";
//the absolute baseURL (hardcoded test)
$baseurl="https://www.example.com";
// Make the URLS absolute
function expand_links($link) {
// add the base URL
return('href="'.$baseurl''.trim($link[0], '\'"/\\').'"');

Keybase proof

I hereby claim:

  • I am wderuijter on github.
  • I am wimder (https://keybase.io/wimder) on keybase.
  • I have a public key whose fingerprint is 320E AFAA 8F1A 9FCF E99F 3572 2D06 B479 219E 7269

To claim this, I am signing this object:

@wderuijter
wderuijter / config.gateway.json
Last active January 24, 2022 10:21
Force internal DNS
{
"service": {
"nat": {
"rule": {
"1": {
"description": "Redirect DNS requests",
"destination": {
"port": "53"
},
"inbound-interface": "eth1",