Skip to content

Instantly share code, notes, and snippets.

View luxuryluke's full-sized avatar
🏊‍♂️
the flow

Luke Dorny luxuryluke

🏊‍♂️
the flow
View GitHub Profile
@scottboms
scottboms / kirby__config.php
Last active December 11, 2020 01:41
Example Kirby 3 recipe for creating a JSON Feed representation of a page with custom route
<?php
// Kirby site config file
// site/config/config.php
return [
'routes' => [
[
// This sets up two different URLs as an array that will
// return the JSON Feed representation of a page in Kirby
'pattern' => ['feed', 'some-other-path/feed'],
'action' => function() {
@scottboms
scottboms / cache.php
Last active May 21, 2020 07:14
Core Kirby config file. See also related files
<?php
/**
* Allows you to use blueprints to tell
* Kirby whether to cache a page or not
*
* eg.
* In a page blueprint
* options:
* cache: false
@una
una / style.css
Last active September 22, 2023 18:11
min() max() clamp()
.sidebar {
/* Select smaller of the 2 calculated values
Narrower screens: 20vw, Wider screens: 300px */
width: min(20vw, 300px);
}
.make-the-logo-bigger {
/* Select larger of the 2 calculated values
Basically clamps the font size to 60px or larger (10vw) */
font-size: max(60px, 10vw);
@niklausgerber
niklausgerber / gist:1647196
Created January 20, 2012 12:39
Protect kirby pages
# The Snippet
<?php
// getting the username and password
$LOGIN_INFORMATION = array(
(string)$page->benutzernamen() => $page->passwort()
// 'user' => 'password',
);
@davist11
davist11 / gist:1204569
Last active January 19, 2024 15:03
Campfire sounds
56k: "https://123.campfirenow.com/images/56k.gif"
bell: ":bell:"
bezos: ":laughing::thought_balloon:"
bueller: "anyone?"
butts: ":open_hands: :smoking:"
clowntown: "https://123.campfirenow.com/images/clowntown.gif"
cottoneyejoe: ":notes::hear_no_evil::notes:"
crickets: "hears crickets chirping"
dadgummit: "dad gummit!! :fishing_pole_and_fish:"
dangerzone: "https://123.campfirenow.com/images/dangerzone.png"
javascript:%20(function(){var%20a=document.getElementsByTagName('script'),i,l,result,rurl=/^http:\/\/use\.typekit\.com\/([0-9A-Za-z]+)\.js/;for(i=0,l=a.length-1;i<l;i++){if(result=rurl.exec(a[i].getAttribute('src'))){window.location.assign('http://typekit.com/colophons/'+result[1]);break;}}%20if(!result){alert('This%20site%20doesn\'t%20use%20Typekit!');}})();