Skip to content

Instantly share code, notes, and snippets.

View tomasnorre's full-sized avatar
🐘

Tomas Norre Mikkelsen tomasnorre

🐘
View GitHub Profile
@xperseguers
xperseguers / README.md
Last active March 23, 2024 18:21
Create composer patch from a pending TYPO3 patch on Gerrit

Following structure is expected for your TYPO3 project (adapt script if it differs):

.
├── composer.json
├── composer.lock
├── patches
│   ├── ...
│   └── ...
└── scripts
@peterkraume
peterkraume / import-production-data
Created January 9, 2020 11:00
DDEV custom command for .ddev/commands/host
#!/bin/bash
## Description: Fetch and import production data
## Usage: import-production-data
## Example: "ddev import-production-data"
SSH_CREDENTIALS="[email protected]"
PRODUCTION_DB_USER="user"
PRODUCTION_DB_PASSWORD="pw"
@tlayh
tlayh / searchIds.sh
Created April 30, 2014 15:46
Shell script to find unused xliff ids in your project. ./searchIds.sh Packages/Applications/My.Package
#!/bin/bash
files=$( find $1 -name "*xlf" )
for file in $files; do
list=$(cat $file | grep "id=" | cut -d '"' -f2)
for i in `echo $list`; do
@pumatertion
pumatertion / debug.php
Created December 29, 2013 08:53
TYPO3 Flow Repository - Debug the current query statement
$query = $this->createQuery();
/**
* @var \Doctrine\ORM\QueryBuilder $queryBuilder
*/
$queryBuilder = \TYPO3\Flow\Reflection\ObjectAccess::getProperty($query, 'queryBuilder', TRUE);
\TYPO3\Flow\var_dump($queryBuilder->getQuery()->getSQL(), __CLASS__ . '#' . __LINE__, FALSE, FALSE);
SELECT table_name AS Tables,
round(((data_length + index_length) / 1024 / 1024), 2) AS SizeInMB
FROM information_schema.TABLES
WHERE table_schema = "DBNAME" ORDER BY SizeInMB DESC;
@sorenmalling
sorenmalling / gist:5421328
Created April 19, 2013 16:04
Gravatar with TypoScript
10 = COA
10 {
10 = TEXT
10 {
value = http://www.gravatar.com/avatar/
}
20 = TEXT
20 {
value = [email protected]
hash = md5