Skip to content

Instantly share code, notes, and snippets.

@Fil
Fil / .gitignore
Last active September 26, 2015 16:08
Outil pour créer une copie locale statique de "mes" seens
# ma config
seen-local-config.php
# stockage de mon backup xml
tmp/
# mes fichiers exportes
seen/
# mes fichiers downloades
@bastianallgeier
bastianallgeier / paneluser.php
Created June 1, 2012 10:37
Put paneluser.php in site/plugins
<?php
s::start();
function panelUser() {
$cookie = cookie::get('auth');
if(!$cookie) return false;
$info = s::get($cookie);
@markrickert
markrickert / giratchive.sh
Created June 12, 2012 20:20
Git Archive Bash Script
#!/bin/bash
# Takes one parameter: a remote git repository URL.
#
# This is the stuff this script does:
#
# 1. Clones the repository
# 2. Fetches all remote branches
# 3. Compresses the folder
# 4. Deletes the cloned folder.
<?php
class kirbytextExtended extends kirbytext {
function __construct($text=false, $markdown=true, $smartypants=true {
parent::__construct($text, $markdown, $smartypants);
// define custom tags
$this->addTags('figure');
@roborourke
roborourke / embed-gist.php
Created June 13, 2012 22:17
Adds autoembedding of gist urls in WordPress
<?php
/**
* Usage:
* Paste a gist link into a blog post or page and it will be embedded eg:
* https://gist.github.com/2926827
*
* If a gist has multiple files you can select one using a url in the following format:
* https://gist.github.com/2926827?file=embed-gist.php
*/
<?php
if(!r::is_ajax()) notFound();
header('Content-type: application/json; charset=utf-8');
$data = $pages->find('blog')->children()->visible()->paginate(10);
$json = array();
@bastianallgeier
bastianallgeier / pagination.php
Created July 19, 2012 13:23
Kirby range pagination with a link for each page
<?php
$list = $page->children()->paginate(10);
$pagination = $list->pagination();
?>
<ul>
<?php foreach($list as $item): ?>
<li><!-- item html --></li>
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

<?php
class kirbytextExtended extends kirbytext {
function __construct($text, $markdown=true) {
parent::__construct($text, $markdown);
$this->addTags('thumb');
$this->addAttributes('crop', 'quality');
@bastianallgeier
bastianallgeier / statify.php
Last active October 4, 2022 17:12
A first draft for a script, which converts a Kirby site into a static site. It's a rough first draft, so don't expect it to be perfect. Play with it, if you like it!
<?php
/**
* Instructions:
*
* 1. Put this into the document root of your Kirby site
* 2. Make sure to setup the base url for your site correctly
* 3. Run this script with `php statify.php` or open it in your browser
* 4. Upload all files and folders from static to your server
* 5. Test your site