Skip to content

Instantly share code, notes, and snippets.

@okayawright
okayawright / renoise.md
Last active November 8, 2020 19:14 — forked from pezz/renoise.md
How to use Renoise on a system without f*#$ing it over and doing your head in
@okayawright
okayawright / 20190423113600_french_translation.php
Last active April 23, 2019 12:00
French translation of Directus core fields
<?php
use Phinx\Migration\AbstractMigration;
class FrenchTranslation extends AbstractMigration
{
public function up()
{
$this->execute(\Directus\phinx_update($this->getAdapter(), 'directus_fields', [ 'translation' => '{"fr-FR": {"action"}}' ], [ 'collection' => 'directus_activity', 'field' => 'action' ]));
@okayawright
okayawright / cliserver.php
Created March 28, 2019 15:36
Apache-like rules for the PHP internal CLI server
<?php
// public/cliserver.php (router script)
if (php_sapi_name() !== 'cli-server') {
die('this is only for the php development server');
}
$path = $_SERVER['DOCUMENT_ROOT'].'/'.$_SERVER['SCRIPT_NAME'];
if (is_file($path)) {
return false;