Skip to content

Instantly share code, notes, and snippets.

View tomasnorre's full-sized avatar
🐘

Tomas Norre Mikkelsen tomasnorre

🐘
View GitHub Profile
/*
The purpose of this script is to daily check Packt's Free Book offer
and notify via e-mail with the title of the book and link to download page.
Author: Douglas Matoso - www.dmatoso.com
Instructions:
1) Create a new Goggle Script at http://script.google.com
2) Paste the code below, putting your email in the "email" var.
3) Execute the checkBook function to test (the script may ask an one time permission)
@tomasnorre
tomasnorre / namespaceRefactor.php
Created February 18, 2016 12:36 — forked from hpbuniat/namespaceRefactor.php
Super-simple script to convert a existing project to use namespaces
<?php
/**
* Super-simple script to convert a existing project to use namespaces
*
* @author Hans-Peter Buniat <hpbuniat@googlemail.com>
* @copyright 2012 Hans-Peter Buniat <hpbuniat@googlemail.com>
* @license http://opensource.org/licenses/BSD-3-Clause
*/
class namespaceRefactor {
@tomasnorre
tomasnorre / Cheffile
Last active January 22, 2016 19:36
Installing mySQL with Chef cookbooks
#!/usr/bin/env ruby
#^syntax detection
site 'http://community.opscode.com/api/v1'
cookbook "ant", :git => "git@github.com:opscode-cookbooks/ant.git"
cookbook "apt", :git => "https://github.com/opscode-cookbooks/apt"
cookbook "git", :git => "git@github.com:opscode-cookbooks/git.git"
cookbook "apache2", :git => "git@github.com:onehealth-cookbooks/apache2.git"
cookbook "mysql", :git => "git@github.com:chef-cookbooks/mysql.git"
@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
/**
* @test
*
* @param $isRunning
* @param $starttime
* @param $starttimeFormatted
* @param $endtime
* @param $endtimeFormatted
* @param $expectedString
*
@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>]
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;
+
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');
+
{
"require-dev": {
"squizlabs/php_codesniffer": "*",
"wimg/php-compatibility": "dev-master",
"simplyadmire/composer-plugins" : "@dev"
},
"require": {
"phpunit/phpunit": "3.7.*",
"squizlabs/php_codesniffer": "2.*"
}
@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:
```