This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace My\MyExtension\Command; | |
use TYPO3\CMS\Core\Utility\GeneralUtility; | |
class MyCommandController extends \TYPO3\CMS\Extbase\Mvc\Controller\CommandController { | |
/** | |
* Make _cli_lowlevel admin for this controller... | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git status --porcelain | awk '($1 ~ /\?\?/) {print "/" $2}' >> .gitignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT sys_template.config, REPLACE(config, ' HTML', ' TEXT') | |
FROM `sys_template` | |
INNER JOIN pages ON pages.uid = sys_template.pid | |
WHERE `config` REGEXP BINARY 'HTML' | |
AND sys_template.deleted = 0 AND sys_template.pid >= '0' | |
AND pages.deleted = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function findRaw(){ | |
$localQuery = $this->createQuery(); | |
$storagePageIds = $localQuery->getQuerySettings()->getStoragePageIds(); | |
$querySettings = $localQuery->getQuerySettings(); | |
$querySettings->setReturnRawQueryResult(TRUE); | |
$localQuery->setQuerySettings( $querySettings ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Permitir iframe, embed, script en RTE | |
# | |
RTE.default.proc.allowTags := addToList(iframe,embed,script,object,param,a,ul,li,ol) | |
RTE.default.proc.allowTagsOutside := addToList(iframe,embed,script,object,param,a,ul,li,ol) | |
RTE.default.removeTagsAndContents := removeFromList(script,object,param,a,ul,li,ol) | |
RTE.default.proc.HTMLparser_db = 0 | |
RTE.default.proc.entryHTMLparser_db = 0 | |
RTE.default.proc.exitHTMLparser_db = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Adapted from http://jimneath.org/2012/05/05/precompile-assets-using-a-git-hook.html | |
# source rvm and .rvmrc if present | |
[ -s "$HOME/.rvm/scripts/rvm" ] && . "$HOME/.rvm/scripts/rvm" | |
[ -s "$PWD/.rvmrc" ] && . "$PWD/.rvmrc" | |
# precompile assets if any have been updated | |
if git diff-index --name-only HEAD | egrep '^css/sass' >/dev/null ; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
find . -name '*.css' -type f | while read fullfilename | |
do | |
filename=`basename $fullfilename` | |
extension="${filename##*.}" | |
filename="${filename%.*}" | |
echo "Converting $fullfilename" | |
sass-convert -T scss --indent t -C $fullfilename > sass/_$filename.scss | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/******************************************/ | |
// db_utf8_fix.php // | |
// Original author: J. van Hemert // | |
// Original Date: 26-10-2011 // | |
// // | |
// Fixes encoding when utf-8-encoded data // | |
// is stored in tables with other (e.g. // | |
// latin_swedish_ci) encoding. // | |
// Will convert all columns in all tables // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
DB_HOST="$1" | |
DB_USER="$2" | |
DB_PASSWORD="$3" | |
DB_NAME="$4" | |
mysqldump -h "$DB_HOST" -u "$DB_USER" -p"$DB_PASSWORD" --opt --quote-names \ | |
--skip-set-charset --default-character-set=latin1 "$DB_NAME" > /tmp/temp.sql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
find . -name '*.jpg' -type f -size +1M -not -name '*backup*' | while read filename | |
do | |
if [ ! -e "$filename.backup.jpg" ] | |
then | |
echo "Backup of $filename.backup.jpg" | |
cp "$filename" "$filename.backup.jpg" | |
fi | |
echo "Limpiando datos de perfil $filename" | |
gm identify "$filename" |
NewerOlder