View astricon.lua
-- This is the Astricon Dangerous Demo application logic built in Lua,
-- and conceived to be used in conjunction with the janus_lua.c plugin.
-- It only uses data channels, and expects commands to control the ARI.
--
-- Note: this example depends on lua-json to do JSON processing
-- (http://luaforge.net/projects/luajson/) and on lua-http for HTTP
-- requests (https://daurnimator.github.io/lua-http/)
json = require('json')
-- Example details
View building janus
./configure \
--prefix=/opt/janus \
--disable-all-plugins \
--disable-all-transports \
--enable-plugin-recordplay \
--enable-plugin-streaming \
--enable-plugin-textroom \
--enable-rest \
--enable-post-processing
View php-pm.service
[Unit]
Description=PHP-pm server
Documentation=https://github.com/php-pm/php-pm
After=network.target
[Service]
User=phppm
Group=phppm
WorkingDirectory=/var/bmss/source/3.2
LimitNOFILE=4096
View php-pm-bolt.php
<?php
namespace PHPPM\Bootstraps;
use PHPPM\Bootstraps\BootstrapInterface;
use Silex\Application;
class Silex implements BootstrapInterface
{
/**
View composer.json
{
"autoload": {
"psr-4": {
"Bolt\\Composer\\EventListener\\": "../vendor/bolt/bolt/src/Composer/EventListener"
}
},
"config": {
"discard-changes": true,
"preferred-install": "dist"
},
View css-var-polyfill.js
/*
TODO:
- Option to wait to apply anything until all <link>s are parsed or inject what we have and update as each <link> returns
*/
var cssVarPoly = {
init: function() {
if (window.CSS && window.CSS.supports && window.CSS.supports('(--foo: red)')) {
return;
}
cssVarPoly.ratifiedVars = {};
View bolt searchquery
$records = $app['query']->getContent('(entries,pages)',
[
'order' => '-datepublish',
'getquery' => function($query) {
$ct = $query->getContentType();
$qb = $query->getQueryBuilder();
$qb->addSelect("MATCH($ct.title) AGAINST('longus') as relevance")
->andWhere("MATCH($ct.title) AGAINST('longus' IN BOOLEAN MODE)")
->having("relevance > 0");
}
View routing.yml
pages:
path: /pages/{slug}
defaults: { _controller: 'Bolt\Controllers\Frontend::record', 'contenttypeslug': 'pages', '_locale': 'en' }
contenttype: pages
paginas:
path: /paginas/{slug}
defaults: { _controller: 'Bolt\Controllers\Frontend::record', 'contenttypeslug': 'pages', '_locale': 'de' }
contenttype: pages
View _relationships.twig
{# Relationships for this record #}
<div class="form-group">
{% for relcontenttype, relation in context.contenttype.relations %}
{# Prefix #}
{% if relation.prefix is defined and relation.prefix is not empty %}
<div class="prefix">