Skip to content

Instantly share code, notes, and snippets.

Lukas Bestle lukasbestle

Block or report user

Report or block lukasbestle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
lukasbestle / kirbytag.php
Last active Jan 6, 2016
Dynamic image Kirbytag
View kirbytag.php
// Please note: Use for tags that don't require access to the files of the page
$field = new Field($page, null, '(image: example.jpg)');
echo $field->kirbytext();
lukasbestle / search.php
Created Nov 5, 2015
Kirby $pages->search() that searches for full matches only
View search.php
* Fork of the native $pages->search() method
* Only searches for full matches
function search($collection, $query, $params = array()) {
if(is_string($params)) {
$params = array('fields' => str::split($params, '|'));
lukasbestle / fizzbuzz.php
Created Aug 31, 2014
Fizz Buzz Test in PHP
View fizzbuzz.php
for($i = 1; $i <= 100; $i++) {
$found = false;
// Divisible by 3
if($i % 3 == 0) {
echo 'Fizz';
$found = true;

Keybase proof

I hereby claim:

  • I am lukasbestle on github.
  • I am lukasbestle ( on keybase.
  • I have a public key whose fingerprint is 3A6F 39F5 BB6A A8D7 EF8D 0DC7 2B97 B9B6 1C7E A7B7

To claim this, I am signing this object:

lukasbestle / kirbytext.extended.php
Created Jun 30, 2014
Kirbytag for HTML5 video (Kirby 1)
View kirbytext.extended.php
class kirbytextExtended extends kirbytext {
function __construct($text, $markdown=true) {
parent::__construct($text, $markdown);
// define custom attributes
lukasbestle /
Last active Aug 29, 2015
Shell script to update every Git repository in direct subdirectories of the script directory
#!/usr/bin/env bash
# Updates every Git repository in direct subdirectories of the script directory
# Usage: ./update
# Copyright: Lukas Bestle <>, 2014
# Check if git is installed
hash git &> /dev/null || {
echo -e "\033[31mYou don't have git installed.\033[0m"
exit 1
lukasbestle /
Created Jan 3, 2014
A simple shell script to install Kirby CMS v2 from GitHub and init a new Git repo for your site
# Get the default theme and switch to the folder
git clone kirbyproject
cd kirbyproject
# Re-create the Git repo (this is a new site)
rm -Rf .git
git init
# Get the Kirby core as submodule
rmdir kirby
lukasbestle / smoothscroll.js
Created Sep 6, 2013
Vanilla JS smooth scrolling
View smoothscroll.js
* Vanilla JS smooth scrolling
* @version 0.1b1
* @author Lukas Bestle <>
* @copyright Lukas Bestle
* @license MIT License
// Configuration
View gist:6142633
// Check iOS Version and change the META
window.onload = function() {
var iOSVersion;
if (/iP(hone|od|ad)/.test(navigator.platform)) {
// supports iOS 2.0 and later
var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
iOSVersion = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];
iOSVersion = parseInt(iOSVersion[0]);
lukasbestle /
Last active Dec 16, 2015
Spendenbytrag mass donator
curl | bash
You can’t perform that action at this time.