Skip to content

Instantly share code, notes, and snippets.

View kdambekalns's full-sized avatar

Karsten Dambekalns kdambekalns

View GitHub Profile
@cweinberger
cweinberger / mysql-drop-all-tables.sh
Created June 6, 2018 12:44
drops all tables of a specific db
#!/bin/bash
#usage: mysql-drop-all-tables -d database -u dbuser -p dbpass
TEMP_FILE_PATH='./drop_all_tables.sql'
while getopts d:u:p: option
do
case "${option}"
in
<?php
#if (${Namespace})
namespace ${Namespace};
#end
#parse("PHP File Header")
#set($setter = "set" + $FieldName.substring(0,1).toUpperCase() + $FieldName.substring(1))
class ${NAME} implements \JsonSerializable
@Sebobo
Sebobo / fabfile.py
Created August 3, 2015 10:49
Example fabfile for Neos
from __future__ import with_statement
from fabric.api import *
from fabric.contrib.console import confirm
env.use_ssh_config = True
env.user = 'username'
env.hosts = ['hostname']
release_dir = '/var/www/path/to/website'
remote_context = 'Production'
# skipping everything above the next line
php composer.phar require --no-progress --no-interaction 'typo3/doctools:dev-master'
FLOW_CONTEXT=Production ./flow typo3.flow:cache:flush
FLOW_CONTEXT=Production ./flow typo3.flow:cache:warmup
FLOW_CONTEXT=Production ./flow typo3.doctools:commandreference:rendercollection Flow
FLOW_CONTEXT=Production ./flow typo3.doctools:reference:rendercollection Flow
# run this in Development - Production doesn't have the needed reflection data
@skurfuerst
skurfuerst / neos-be-adjustments.css
Created April 30, 2015 08:18
CSS adjustments to a site to play well in Neos Backend
/* General Adjustmens to the Neos Backend - we only do that if "neos-controls" is visible, that is we are NOT in full-screen mode. */
/* Bootstrap gives the "container" specific widths (inside media queries); which breaks the margins Neos adds to the body.
Thus, we need to reset these settings. */
.neos-controls .container {
width: inherit !important;
}
/* The topbar of neos needs some space, so we push the top navigation lower */
.neos-controls .page-topNavigation {
@aertmann
aertmann / gist:33c74c10f76edc26ed67
Last active April 23, 2018 11:28
Add target _blank to external links in Neos – Included in https://speakerdeck.com/aertmann/tasty-recipes-for-every-day-neos
<?php
namespace Acme\Acme\TypoScript;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Neos\Domain\Exception;
use TYPO3\Neos\Service\LinkingService;
use TYPO3\TYPO3CR\Domain\Model\NodeInterface;
use TYPO3\TypoScript\TypoScriptObjects\AbstractTypoScriptObject;
/**
@iansltx
iansltx / _safari-iframe-cookie-workaround.md
Last active August 5, 2026 01:45
Safari iframe cookie workaround
@radmiraal
radmiraal / bash
Last active August 29, 2015 14:07
Run behat tests on CI with internal php webserver
#!/bin/bash
# Searches for all behat.ci.yaml files in the project and runs the tests
FLOW_CONTEXT=Development/Behat php -S 0.0.0.0:8452 -t Web/ &
phpPid=$!
find . -type f -path "*/Tests/Behavior/behat.ci.yml" -print0 | while IFS= read -r -d $'\0' line; do
bin/behat -c $line
done
@cognifloyd
cognifloyd / Guardfile
Last active August 29, 2015 14:03
Guard + Guard-PhpUnit2 + TYPO3.Flow based application
# http://erichogue.ca/2012/09/php/continuous-testing-in-php-with-guard/
#Unit Tests
guard 'phpunit2',
:command => './bin/phpunit',
:cli => '-c Build/BuildEssentials/PhpUnit/UnitTests.xml',
#Important! No trailing slash!
:tests_path => Dir.glob('Packages/{Framework,Applications,Boilerplates}/*/Tests/Unit'),
#realtime uses log-json which emits tons of Notices about "Array to string conversion" when testing TYPO3.Eel/Context
:realtime => true,