Skip to content

Instantly share code, notes, and snippets.

@Torsten85
Torsten85 / index.js
Created July 26, 2016 16:01
JohnnyFive / chip-io / oled
var five = require('johnny-five');
var Chip = require('chip-io');
var Oled = require('oled-js');
var io = new Chip();
io.i2cConfig({
address: 0x3c,
bus: 2
@Torsten85
Torsten85 / PagePreviewRenderer.php
Created November 26, 2015 08:10
Showing the preview section of fluidpages.
<?php
namespace My\Extension\Hooks;
use FluidTYPO3\Fluidpages\Provider\PageProvider;
use TYPO3\CMS\Backend\Controller\PageLayoutController;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use FluidTYPO3\Flux\Service\WorkspacesAwareRecordService;
use FluidTYPO3\Flux\View\PreviewView;
@Torsten85
Torsten85 / Policy.yaml
Created June 6, 2015 14:54
Goal is to have a page (node) that shows up when you are not logged in, and is hidden when you are.
# #
# Security policy for the TYPO3.NeosDemoTypo3Org package #
# #
privilegeTargets:
'TYPO3\TYPO3CR\Security\Authorization\Privilege\Node\ReadNodePrivilege':
'TYPO3.NeosDemoTypo3Org:RegisterPage':
# e5335cad-2647-db8a-c15d-a5d69cf0d612 is the node identifier of the "register" node
# #
# Security policy for the TYPO3.NeosDemoTypo3Org package #
# #
privilegeTargets:
'TYPO3\Flow\Security\Authorization\Privilege\Method\MethodPrivilege':
TYPO3_NeosDemoTypo3Org_RegistrationAccess:
matcher: method(TYPO3\NeosDemoTypo3Org\Controller\RegistrationController->(index|newAccount|createAccount|createTemporaryAccount)Action())
TYPO3_NeosDemoTypo3Org_FlickrAccess:
{
"name": "typo3/flow-base-distribution",
"description": "TYPO3 Flow Base Distribution",
"license": "LGPL-3.0+",
"config": {
"vendor-dir": "Packages/Libraries",
"bin-dir": "bin"
},
"require": {
"typo3/flow": "2.3.1",
@Torsten85
Torsten85 / names.html
Created May 17, 2014 15:35
Click "Insert random name" twice and the click "Update first name" ... why is the first name not updated?!
<template name="name_list">
<ul>
{{#each names}}
<li>{{this.name}}</li>
{{/each}}
</ul>
<button class="insert">Insert random name</button>
<button class="update">Update first name</button>
@Torsten85
Torsten85 / template.html
Created December 19, 2013 10:34
When directly referencing a template in the inclusion tag, the templating engine reactively updates this template. If a helper method that returns a template component is used, the template is rerendered.
<head>
<title>template</title>
</head>
<body>
{{> testB}}
</body>
<template name="testA">
if (Meteor.isClient) {
Items = new Meteor.Collection('items', {connection: null, transform: function (doc) {
doc.render = function () {
console.log('rendered ' + this.name);
return 'rendered ' + this.name;
};
return doc;
var openssl = spawn('openssl', [ 'smime'
, '-sign'
, '-binary'
, '-signer', '/path/to/cert.pem'
]);
openssl.stdin.write(fileToSignAsBuffer);
openssl.stdin.end();