Skip to content

Instantly share code, notes, and snippets.

View tomasnorre's full-sized avatar
🐘

Tomas Norre Mikkelsen tomasnorre

🐘
View GitHub Profile
@tomasnorre
tomasnorre / gist:772928763ed6d154e58a
Created March 12, 2015 08:22
TYPO3Surf Deployment
<?php
$workflow = new \TYPO3\Surf\Domain\Model\SimpleWorkflow();
$workflow->setEnableRollback(FALSE);
$workflow->addTask('typo3.surf:typo3:flow:setfilepermissions',
array(
'username' => 'jenkins',
'webserverUsername' => 'www-data',
'webserverGroupname' => 'www-data'
)
....
public function tearDown() {
if (!$this->persistenceManager instanceof \TYPO3\Flow\Persistence\PersistenceManagerInterface){
$this->persistenceManager = $this->objectManager->get('TYPO3\Flow\Persistence\PersistenceManagerInterface');
};
if (!$this->playerRepository instanceof \TomasNorre\GolfnetInvitational\Domain\Repository\PlayerRepository){
$this->playerRepository = $this->objectManager->get('TomasNorre\GolfnetInvitational\Domain\Repository\PlayerRepository');
};
$this->playerRepository->removeAll();
@tomasnorre
tomasnorre / Jenkins-SH
Created May 3, 2015 17:06
$repository->removeAll()
#!/bin/sh
echo "FLOW_CONTEXT: $FLOW_CONTEXT ... "
mkdir -p Quickstart/Packages/Applications/TomasNorre.GolfnetInvitational/
cd Quickstart/Packages/Applications/TomasNorre.GolfnetInvitational/
git clone [email protected]:tomasnorre/tomasnorre.golfnetinvitational.git .
cd -
cd Quickstart
./flow package:activate TomasNorre.GolfnetInvitational
@tomasnorre
tomasnorre / Player.php
Last active August 29, 2015 14:23
$playerRepository->findAllInTeam()
<?php
namespace TomasNorre\GolfnetInvitational\Domain\Model;
use TYPO3\Flow\Annotations as Flow;
use Doctrine\ORM\Mapping as ORM;
/**
* Class Player
* @package TomasNorre\GolfnetInvitational
*
@tomasnorre
tomasnorre / vagrant up t3o-web.rb
Created July 30, 2015 10:18
Error message when provisioning my t3o-www devbox
[2015-07-30T12:14:46+02:00] INFO: Forking chef instance to converge...
[2015-07-30T12:14:46+02:00] WARN:
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SSL validation of HTTPS requests is disabled. HTTPS connections are still
encrypted, but chef is not able to detect forged replies or man in the middle
attacks.
To fix this issue add an entry like this to your configuration file:
```
{
"require-dev": {
"squizlabs/php_codesniffer": "*",
"wimg/php-compatibility": "dev-master",
"simplyadmire/composer-plugins" : "@dev"
},
"require": {
"phpunit/phpunit": "3.7.*",
"squizlabs/php_codesniffer": "2.*"
}
Index: classes/class.tx_languagevisibility_visibilityService.php
===================================================================
--- classes/class.tx_languagevisibility_visibilityService.php (revision 70289)
+++ classes/class.tx_languagevisibility_visibilityService.php (working copy)
@@ -130,6 +130,8 @@
public function isVisible(tx_languagevisibility_language $language, tx_languagevisibility_element $element, $omitLocal = false) {
$this->_relevantOverlayLanguageId = $language->getUid();
+ $languageRep = t3lib_div::makeInstance('tx_languagevisibility_languagerepository');
+
Index: hooks/class.tx_languagevisibility_hooks_t3lib_page.php
===================================================================
--- hooks/class.tx_languagevisibility_hooks_t3lib_page.php (revision 48229)
+++ hooks/class.tx_languagevisibility_hooks_t3lib_page.php (working copy)
@@ -74,6 +74,8 @@
* @return void
*/
public function getRecordOverlay_preProcess($table, &$row, &$sys_language_content, $OLmode, t3lib_pageSelect $parent) {
+ global $TCA;
+
@tomasnorre
tomasnorre / commandline
Created October 6, 2015 19:15 — forked from sorenmalling/commandline
Installing TYPO3 CMS 7.4 with composer and typo3_console
# Just read the help
soren@kevin  ~/Sites/typo3-hyttekort  ./typo3cms help install:setup
Alpha version of a setup command. Use with care and at your own risk!
COMMAND:
typo3_console:install:setup
USAGE:
/Users/soren/Sites/typo3-hyttekort/./typo3cms ./typo3cms install:setup [<options>]
/**
* @test
*
* @param $isRunning
* @param $starttime
* @param $starttimeFormatted
* @param $endtime
* @param $endtimeFormatted
* @param $expectedString
*