Skip to content

Instantly share code, notes, and snippets.

View tomasnorre's full-sized avatar
🐘

Tomas Norre Mikkelsen tomasnorre

🐘
View GitHub Profile
....
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 git@bitbucket.org: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
*
@tomasnorre
tomasnorre / step-by-step-vagrant.txt
Created October 16, 2015 09:00
TYPO3.org Vagrant
$ git clone git://git.typo3.org/Teams/Server/Vagrant/Typo3Org.git
$ cd Typo3Org
$ vagrant up <-- Fails with gem "mysql" install
$ vagrant ssh t3o-web
$ sudo apt-get install libmysqld-dev
$ cd /usr/local/bin
$ sudo wget http://github.com/mailhog/MailHog/releases/download/v0.1.6/MailHog_linux_amd64 -O MailHog
$ sudo chmod +x MailHog
$ exit
$ vagrant provision t3o-web