https://blokas.io/patchbox-os/
sudo nano /boot/config.txt
enable_uart=1
dtoverlay=midi-uart0
https://blokas.io/patchbox-os/
sudo nano /boot/config.txt
enable_uart=1
dtoverlay=midi-uart0
Using handlebars in WordPress.
One approach we have taken is to mix handlebars templates into the standard WordPress theme templates.
We have a template function available in WordPress render_hbs_template
which will render a handlebars template using the data provided.
Under the hood render_hbs_template
uses this PHP class https://github.com/zordius/lightncandy
The render function handles some logic around caching the compiled templates to improve performance using these.
Here is an example single.php template of how this might be used to render an article.
(function() { | |
var CSSCriticalPath = function(w, d, opts) { | |
var opt = opts || {}; | |
var css = {}; | |
var pushCSS = function(r) { | |
if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
for(var i = 0; i < styles.length; i++) { | |
if(!!styles[i] === false) continue; | |
var pair = styles[i].split(": "); |
/* | |
* RPi2c - test i2c communication between an Arduino and a Raspberry Pi. | |
* | |
* Copyright (c) 2013 Carlos Rodrigues <[email protected]> | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
/*jslint devel: true, indent: 2 */ | |
// 15.2.3.2 | |
if (!Object.setPrototypeOf) { | |
Object.setPrototypeOf = (function(Object, magic) { | |
'use strict'; | |
var set; | |
function checkArgs(O, proto) { | |
if (typeof O !== 'object' || O === null) { | |
throw new TypeError('can not set prototype on a non-object'); | |
} |