Skip to content

Instantly share code, notes, and snippets.

View adilinden's full-sized avatar

Adi Linden adilinden

View GitHub Profile
@adilinden
adilinden / guac_build.md
Last active October 1, 2020 11:45
Building apache/guacamole on Ubuntu 18.04

Guacamole

This is a HTML5 to RDP gateway

Base System

Ubuntu 18.04 installed from my template.

First Login

@adilinden
adilinden / lightbox.php
Created December 4, 2014 07:09
A kirbytag to insert a lightbox using slimbox2.js. (Kirby CMS)
<?php
/*
* This is a lightbox kirbytag
*
*/
kirbytext::$tags['lightbox'] = array (
'attr' => array (
'caption','alt','class','group',
'width','height','crop',
@adilinden
adilinden / methods.php
Created December 4, 2014 07:07
A custom field method to strip kirbytags and create excerpt. (Kirby CMS)
<?php
field::$methods['no_tag_excerpt'] = function($field, $chars = 140) {
$text = $field->value;
// strip kirbytags
$text = preg_replace('!(?=[^\]])\([a-z0-9]+:.*?\)!i', '' ,$text);
// markdown to html
$text = markdown($text);