Skip to content

Instantly share code, notes, and snippets.

@fabtho
fabtho / README.md
Last active November 13, 2019 15:10 — forked from boppy/README.md
Quick'n'dirty mass edit for TYPO3 file list in Chrome

Regarding TYPO3 CMS Feature #60907:

To manipulate Websites I use this Chrome Extension: User JavaScript and CSS

To have a "edit all"-Button I use the following script on the TYPO3-Domain, with an additional bookmarklet to call _editAllMetaData.

To create a bookmarklet make a fresh bookmark in you bookmark bar, edit it, name it "edit all" and fill this into the URL: "javascript:(window._editAllMetaData());"

It inserts a button in the file table's header or, if not present, it appends it to the search form.

@fabtho
fabtho / search_for_not_working_functions.sh
Created June 20, 2019 15:53
search for PHP 5.6 function not working in PHP 7.2
# source http://php.net/manual/en/migration70.incompatible.php
# Changes to the handling of indirect variables, properties, and methods
ag --php --literal \$\$ .
# list() no longer assigns variables in reverse order, change in list($a[], $a[], $a[]) = [1, 2, 3];
ag --php " list\(.*?\[.*?\)"
# Empty list() assignments have been removed
ag --php --literal " list()"
# Array ordering when elements are automatically created during by reference assignments has changed
ag --php --literal " =& "
# Negative bitshifts
@fabtho
fabtho / robots.txt
Created July 30, 2018 14:36
This generates as sitemap.xml for TYPO3 only with Typsoscript. This example is with realurl and news. (tx_news) . Tested in TYPO3 8 LTS. Use "Sitemap: https://www.example.com/?type=200" in robots.txt to point to it.
User-Agent: *
Disallow:
Sitemap: https://www.example.ch/?type=200
0x2A1049062c6Cfd69bd38fbaf3b0559DF1DBbc92c
@fabtho
fabtho / save_screenshot.py
Last active December 12, 2022 08:07
make full screenshot with selenium in python
#!/usr/bin/python
from selenium import webdriver
from PIL import Image
from cStringIO import StringIO
verbose = 1
browser = webdriver.Firefox()
browser.get('http://stackoverflow.com/questions/37906704/taking-a-whole-page-screenshot-with-selenium-marionette-in-python')
@fabtho
fabtho / typo3_minorupdate.sh
Last active February 23, 2016 16:53
typo3_minorupdate script
#!/bin/bash
read -p "TYPO3 Version to upgrade, 6.2.xx or 7.6.x: " version
echo $version
path=/var/www/
major=${version::1}
minor=${version:2:1}
echo major version is: $major
echo minor version is: $minor
read -p "Ok? Abort with Ctrl-C if not!" ok
if (( $major == 7 )); then