Skip to content

Instantly share code, notes, and snippets.

View josefglatz's full-sized avatar
👨‍💻

Josef Glatz josefglatz

👨‍💻
View GitHub Profile
@josefglatz
josefglatz / PageLayoutViewDrawItem.php
Created November 8, 2014 12:29
TYPO3CMS tt_content_drawItem hook example (TYPOCMS 6.2)
<?php
namespace J18\J18thmsimkup\Hooks;
/***************************************************************
* Copyright notice
*
* (c) 2014 GLATZ, Josef <jousch@gmail.com>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
@josefglatz
josefglatz / reminder-dirtyTikaAppInstall
Created November 12, 2014 10:26
Dirty install procedure: Precompiled Apache Tika App on Debian (just a reminder)
apt-get update && apt-get install openjdk-7-jdk
mkdir -p /opt/solr-tomcat/tika/
cd /opt/solr-tomcat/tika/
rm ./tika*
wget http://archive.apache.org/dist/tika/tika-app-1.2.jar
chmod +x tika-app-1.2.jar
<?php
/****************************************************/
// db_delete_records.php //
// Author: Christian Wolfram <c.wolfram@chriwo.de> //
// Date: 12-11-2014 //
// //
// Deletes all records in the database that //
// are marked as deleted. //
// //
// Run from root directory of your TYPO3 //
@josefglatz
josefglatz / SpotifyToHipChat.scpt
Last active August 29, 2015 14:10
Spotify to HipChat with Cover Support
-- Free JSON Helper for AppleScript is required to fetch Spotify Web API (from Apple App Store)
tell application "Spotify"
set current_track to null
set current_artist to null
set current_album to null
repeat until application "Spotify" is not running
set track_name to name of current track
set track_artist to artist of current track
set track_album to album of current track
@josefglatz
josefglatz / gist:89a95af65bee7bd50e5a
Created December 16, 2014 19:14
TYPO3CMS Auslesen Ressource (als Notiz für Websailor)
10 = FILES
10 {
begin = 0
maxItems = 1
references {
table = pages
uid.field = uid
fieldName = media
}
renderObj = IMAGE
@josefglatz
josefglatz / TYPO3 CONTEXT Backend Logo.php
Last active August 29, 2015 14:12
TYPO3CMS 6.2 LTS: Set backend logo depending on TYPO3_CONTEXT
<?php
/***************
* Set backend logo depending on TYPO3_CONTEXT
* supports
* Development
* Testing
* Production/Staging
* Production/Live
*/
if (GeneralUtility::getApplicationContext()->isDevelopment()) {
@josefglatz
josefglatz / preventGeneratingEmptyLink.ts1
Created January 26, 2015 17:02
TYPO3CMS parseFunc configuration to prevent empty <a /> tags
@josefglatz
josefglatz / stdWrap.replacement.removeFilePath.ts1
Created March 5, 2015 13:05
TYPO3 CMS stdWrap example "replacement :: Remove filepath via regex"
tt_content.uploads.20.itemRendering.20.1.10 = TEXT
tt_content.uploads.20.itemRendering.20.1.10 {
data = register:filename
replacement {
10 {
search = #^(.*[\/\\])#i
replace =
useRegExp = 1
}
}
10 = TMENU
10 {
NO {
ATagTitle.field = abstract // nav_title
wrapItemAndSub = <li>|</li>
stdWrap {
cObject = COA
cObject {
10 = FILES
10 {
@josefglatz
josefglatz / redmine-email-configuration.yml
Last active August 29, 2015 14:18
Redmine working Sending Email with Gmail Apps E-Mail (Redmine 2.4.2 / Ruby 1.9.3)
# /etc/redmine/default/configuration.yml
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
address: 'smtp.gmail.com'
port: 587
domain: 'yourGoogleAppDomain.at'
authentication: 'plain'