Skip to content

Instantly share code, notes, and snippets.


Dane Lowe danelowe

View GitHub Profile
View lazy-hydration.ts
import { Component, defineAsyncComponent, defineComponent, h } from 'vue'
export function hydrateNever(componentOrFactory: Component): Component {
return makeHydrationBlocker(componentOrFactory, {
beforeCreate() {
this.never = true
danelowe / README.markdown
Last active Mar 25, 2021
Mopidy and librespot (spotify connect)
View README.markdown

Method taken from

Assuming mopidy and Iris etc are already installed, we need to install mpc, so that we can stop playback on mopidy when we use spotify connect

sudo apt-get install mpc 

Then we install the easiest librespot spotify connect system

danelowe / gist:dab47d7f73cfacf7662f
Last active Apr 22, 2017
Wordpress MU router.php
View gist:dab47d7f73cfacf7662f
$path = '/'.ltrim(parse_url($_SERVER['REQUEST_URI'])['path'],'/');
// Do some URL rewriting
if (preg_match('/\/([_0-9a-zA-Z-]+\/)?(wp-.*)/', $path, $matches)) {
$path = '/' . $matches[2];
if (file_exists($root . $path) && is_file($root . $path) && !strpos($path, ".php")) {
// The rewritten path is to a non-PHP file. It's probably a static asset
danelowe / .gitignore
Created Oct 22, 2013
Magento .gitignore
View .gitignore
View development_router.php
//$_SERVER['MAGE_RUN_CODE'] = 'au';
//$_SERVER['MAGE_RUN_CODE'] = 'us';
if (strpos($uri, '?') !== false)
list($uri, $params) = explode('?', $uri, 2);
if (file_exists(__DIR__ . '/' . $uri)) {
return false; // serve the requested resource as-is.
} else {
include_once 'index.php';