Skip to content

Instantly share code, notes, and snippets.

@fityanos
fityanos / mysql-cypress-connection-mac.md
Last active February 5, 2024 20:53
connecting mysql to your cypress tests

Verify if you have MYSQL

1- Through your terminal, make sure that you have mysql by running:

which mysql

2- If you got the path means you have mysql and you can verify mysql status by running:

brew services list
<?php
/**
* This is a preview for an upcoming Kirby feature.
*
* This class extends all pages with the template
* project.php and makes it possible to add custom features
* and methods to the $page object, which can then be
* used everywhere throughout Kirby.
*
<meta name="description" content="<?php echo $page->description()->or($site->description()) ?>">
@bastianallgeier
bastianallgeier / multilangcontent.php
Last active September 17, 2015 02:25
In Kirby's multi-lang version it is super easy to fetch content from different languages in a template.
<?php snippet('header') ?>
<h2>English Version</h2>
<h3><?php echo $page->content('en')->title()->html() ?></h3>
<?php echo $page->content('en')->text()->kirbytext() ?>
<h2>German Version</h2>
<h3><?php echo $page->content('de')->title()->html() ?></h3>
@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
@ffub
ffub / PaymentGatewayPayPal.module
Last active January 26, 2016 08:02
A basic Processwire module to send payments to PayPal and process the IPN response using the website payments standard API.
<?php
class PaymentGatewayPayPal extends WireData implements Module, ConfigurableModule {
/*
* Module details, defaults and initialisation
*
*/
public static function getModuleInfo()
@somatonic
somatonic / TagsHelper.module
Created August 31, 2012 21:05
Find related pages using Fieldtype Page for tagging. Returns PageArray with added property "score" for later use.
<?php
/**
* TagsHelper ProcessWire2.+ Module
*
*
* @author Soma
* modified 2012/08/31
*
* ProcessWire 2.x
@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>