Skip to content

Instantly share code, notes, and snippets.

View kathangeorg's full-sized avatar

Schorsch kathangeorg

View GitHub Profile
@kathangeorg
kathangeorg / AdditionalConfiguration.php
Last active July 6, 2020 22:00
Override for staticfilecache BoostQueueCommand.php
<?php
/*
* typo3conf/AdditionalConfiguration.php
*/
// ... all the other stuff ...
if (isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['staticfilecache'])) {
$oExtensionConfig = TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(SFC\Staticfilecache\Service\ConfigurationService::class);
@kathangeorg
kathangeorg / gist:f2cc7e872c942ee9e28a
Created March 21, 2015 10:32
Less Webfont Example
//** Load fonts from this directory.
@icon-font-path-custom: "/typo3conf/path/to/your/fonts/";
@font-face {
font-family: 'YourFont';
font-style: normal;
font-weight: 400;
src: url('@{icon-font-path-custom}your-webfont.eot');
src: url('@{icon-font-path-custom}your-webfont.eot?#iefix') format('embedded-opentype'),
url('@{icon-font-path-custom}your-webfont.woff') format('woff'),

To do

  • Post to Hacker News
  • Share HN post on Twitter

Next

  • Raise $1MM
  • Retire
@kathangeorg
kathangeorg / TYPO3 FED thumbs.php BUG
Last active December 20, 2015 23:08
TYPO3 FED thumbs.php Bug: Images are not shown in backend if there is an ' ' on the beginning of thumbs.php at rendering an image -> in my case warnings from FED made ' ' at the beginning
It's not only RealURL's problem - although it's most common while users are manipulating this file manually to add custom rules. Anyway this problem also ocures with typo3conf/localconf.php.
How to confirm:
Right click on the broken image and choose Open image in new window it will open a file with address like: http://somedomain.tld/typo3/thumbs.php?&file=..%2Fuploads%2...etc use some browser to preview the source code ie. in Chrome prepend the address with view-source: like: view-source:http://somedomain.tld/typo3/thumbs.php?&file=...etc. There should not be any whitespaces before the code of image...
How to prevent?
As you wrote. Check your config files like realurl_conf.php or localconf.php and make sure that there are no spaces before <?php. In case of script ending.... just remove the ?> tag, so script will end automatically without white spaces (even if you'll add 100 empty lines after last line of code), unfortunately sometimes finding this one annoying space in configs takes hours, so....
@kathangeorg
kathangeorg / bash.sh
Last active December 18, 2015 10:09
Bash: Escape Single Quotes ' #bash #escape #single quote
Strong quoting
Strong quoting is very easy to explain:
Inside a single-quoted string nothing(!!!!) is interpreted, except the single-quote that closes the quoting.
echo 'Your PATH is: $PATH'
That $PATH won't be expanded, it's interpreted as normal ordinary text, because it's surrounded by strong quotes.
In practise that means, to produce a text like Here's my test… as a single-quoted string, you have to leave and re-enter the single-quoting to get the character "'" as literal text:
@kathangeorg
kathangeorg / tt_news SETUP
Created April 24, 2013 16:01
TYPO3 SETUP for tt_news
##############################
## tt_news ###################
plugin.tt_news {
# Pagebrowser konfigurieren
usePiBasePagebrowser = 1
pageBrowser {
#maxPages = 5
#tableParams = 0
showPBrowserText = 0
showFirstLast = 1
@kathangeorg
kathangeorg / gist:4079941
Created November 15, 2012 17:27
bash mysql mysqldump charset
mysqldump --default-character-set=utf8 -udb58799_xxx -pxxxxxxxxxx -hmysql5.xxxxxx.de db58799_xxx > db58799_xxx_1211_v2.sql
mysql --default-character-set=utf8 -udb58799_xxx -pxxxxxxxxxx -hmysql5.xxxxxx.de db58799_xxx < db58799_xxx_1211_v2.sql
@kathangeorg
kathangeorg / gist:3952253
Created October 25, 2012 12:14
Shell chmod Files Or Folders
find Verz -type d -print0 | xargs -0 chmod 750
find Verz -type f -print0 | xargs -0 chmod 640
@kathangeorg
kathangeorg / gist:3951989
Created October 25, 2012 10:53
Contenido UTF8 Server MYSQL Umlaute
// in die conlib/db_mysql.inc
/* public: connection management */
function connect($Database = "", $Host = "", $User = "", $Password = "") {
/* Handle defaults */
if ("" == $Database)
$Database = $this->Database;
if ("" == $Host)
$Host = $this->Host;
@kathangeorg
kathangeorg / gist:3951987
Created October 25, 2012 10:52
contenido UTF8 Server MYSQL
// in die conlib/db_mysql.inc
/* public: connection management */
function connect($Database = "", $Host = "", $User = "", $Password = "") {
/* Handle defaults */
if ("" == $Database)
$Database = $this->Database;
if ("" == $Host)
$Host = $this->Host;