Skip to content

Instantly share code, notes, and snippets.

View dimaip's full-sized avatar
👨‍💻
Making @neos UI great

Dmitri Pisarev dimaip

👨‍💻
Making @neos UI great
View GitHub Profile
@dimaip
dimaip / Column.html
Last active August 29, 2015 14:04
Zurb Foundation Grid for TYPO3Neos
{namespace ts=TYPO3\TypoScript\ViewHelpers}
<div{attributes -> f:format.raw()}>
<ts:render path="content" />
</div>
<?php
namespace TYPO3\Neos\Service;
/* *
* This script belongs to the TYPO3 Flow package "TYPO3.Neos". *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License, either version 3 of the *
* License, or (at your option) any later version. *
* *
...
if($newsItem['news_files']){
foreach(explode(',',$newsItem['news_files']) as $i => $file_name){
$asset = $this->importFile('/www/sfi.ru/web/uploads/media/'.$file_name);
if($asset){
$assets[] = $asset;
}
}
$fileTemplate = new \TYPO3\TYPO3CR\Domain\Model\NodeTemplate();
@dimaip
dimaip / gist:7ae762c829de3855802f
Last active August 29, 2015 14:07
Drop the resources in Neos
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE typo3_flow_resource_resource;
TRUNCATE typo3_flow_resource_resourcepointer;
TRUNCATE typo3_media_domain_model_asset;
TRUNCATE typo3_media_domain_model_image;
TRUNCATE typo3_media_domain_model_tag;
TRUNCATE typo3_media_domain_model_asset_tags_join;
TRUNCATE typo3_media_domain_model_document;
SET FOREIGN_KEY_CHECKS=1;
@dimaip
dimaip / gist:417a6709345ff64561bc
Last active August 29, 2015 14:08
Alternative to content collections?
prototype(Sfi.Widgets:AutoRender) < prototype(TYPO3.TypoScript:Case) {
default{
condition = ${true}
type = ${q(node).property('_nodeType')}
}
}
prototype(Sfi.Widgets:ContentCollection) < prototype(TYPO3.TypoScript:Collection) {
collection = ${q(node).children()}
itemRenderer = Sfi.Widgets:AutoRender
{namespace neos=TYPO3\Neos\ViewHelpers}
{namespace media=TYPO3\Media\ViewHelpers}
<f:section name="tab">
<div class="QuoteAndPictureBlockAnchor">
<f:if condition="{image}">
<div class="QuoteAndPictureBlockAnchor-Image">
<media:image asset="{image}" alt="{alternativeText}" title="{title}" maximumWidth="{maximumWidth}" maximumHeight="{maximumHeight}" allowCropping="{allowCropping}" allowUpScaling="{allowUpScaling}" />
</div>
@dimaip
dimaip / gist:49b1f23b0df7198af3a8
Last active August 29, 2015 14:23
Travel expenses reimbursement sponsoring for Neos code sprint

Dear friends!

Ever since I started using Neos CMS almost one year ago, participation in Neos code sprints was one of the major sources of inspiration and a way to give back to the community. I happen to work in the most amazing place on earth, St Philaret`s Christian Orthodox Institute, and they sponsor my participation in code sprints as part of my work time. TYPO3 Association used to provide one last piece to make miracle happen: travel expenses reimbursement.

However after Neos had split from T3A things are in transition and it's not clear whether we get official reimbursement for the next code sprint or not, and the situation will not get any more clear until at least end of June.

So here's the deal:

  1. I want to participate in the Neos code sprint taking place before T3DD15.
@dimaip
dimaip / shri.js
Last active August 29, 2015 14:26 — forked from verkholantsev/shri.js
Задание на ШРИ 2015
/**
* Реализация API, не изменяйте ее
* @param {string} url
* @param {function} callback
*/
function getData(url, callback) {
var RESPONSES = {
'/countries': [
{name: 'Cameroon', continent: 'Africa'},
{name :'Fiji Islands', continent: 'Oceania'},
@dimaip
dimaip / transcriber.md
Created October 2, 2015 14:12
Audio transcription service

I have a project idea, that is very well needed in our church, but I wonder if it would be interesting for wider circles. We often need to transcribe (i.e. turn audio into text) of sermons, interviews, conferences etc for our websites our newspapers. Usually volunteers help out with it. Current workflow is:

  1. Convert some weird audio format into mp3
  2. Split mp3 into, let's say, 10 minute pieces
  3. Distribute those pieces among volunteers
  4. Volunteers have to download some audio player that supports keyboard shortcuts, slowing down speed and setting volume to more than 100%
  5. Track progress and then collect transcribed texts from volunteers
  6. Stich those texts into one file and proofread it, edit it etc

You get the point... Perfect place to introduce some automation: I want all of this to be automated in an online service.

@dimaip
dimaip / LayoutGalleryViewHelper.php
Created June 25, 2012 13:20
Draft of the typo3 fluid viewhelper to layout photos like in google plus gallery. Based on the for viewhelper
<?php
/* *
* This script is backported from the FLOW3 package "TYPO3.Fluid". *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License, either version 3 *
* of the License, or (at your option) any later version. *
* *
* The TYPO3 project - inspiring people to share! *