Skip to content

Instantly share code, notes, and snippets.

View infabo's full-sized avatar
🏠
Working from home

Ingo Fabbri infabo

🏠
Working from home
View GitHub Profile
[xdebug]
xdebug.profiler_enable_trigger=on
xdebug.remote_autostart=off
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.idekey=ECLIPSE_XDEBUG
xdebug.collect_vars=on
xdebug.collect_params=4
after 'deploy:update_code', 'magento-snapshot:initialize'
namespace :magento-snapshot do
desc "Initialize snapshot directories"
task :initialize, :roles => [:app] do
# Create snapshot directory
run "mkdir -p #{shared_path}/snapshot"
# Remove existing snapshot dir in case it is in the release path
@kathangeorg
kathangeorg / ts.ts
Created May 2, 2012 14:08
Typo3 TypoScript Variablen wie page : uid auslesen
temp.typo3Variable = COA
temp.typo3Variable {
5 = TEXT
5 {
# Datum
insertData = 1
data = date : d-m-y
wrap = <p> Das Datum heute: | </p>
}
@Mins
Mins / mysql_secure.sh
Last active February 16, 2024 00:03
Automating mysql_secure_installation
#!/bin/bash
aptitude -y install expect
// Not required in actual script
MYSQL_ROOT_PASSWORD=abcd1234
SECURE_MYSQL=$(expect -c "
set timeout 10
@chrisjlee
chrisjlee / drupal-views-share-global-text-field
Last active April 23, 2024 04:07
share url's for facebook, twitter, pinterest with just get variables
<ul>
<li class="share-text">Share this>/li>
<li class="share-tw"><a href="http://twitter.com/share?text=[title]"><span></span></a></li>
<li class="share-fb"><a href="http://www.facebook.com/sharer.php?u=/node/[nid]&p=[title]"><span></span></a></li>
<li class="share-pinterest"><a href="http://pinterest.com/pin/create/button/?url=/node/[nid]&description=[title]"><span></span></a></li>
</ul>
@edannenberg
edannenberg / magento_url_rewrite.patch
Last active August 11, 2022 17:27
Fixes the catalog url rewrite indexer in Magento 1.7.x-1.9.x See https://github.com/magento/bugathon_march_2013/issues/265 for details.Update: DexterDee in the ticket above noted that the previous patch had some side effects. This updated patch still feels like duct tape but at least it seems to be free of the mentioned side effects. It also fix…
diff -rupN mage_org/app/code/core/Mage/Catalog/Model/Url.php src_shop/app/code/core/Mage/Catalog/Model/Url.php
--- mage_org/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:48:25.679009391 +0100
+++ src_shop/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:49:24.188005601 +0100
@@ -643,13 +643,24 @@ class Mage_Catalog_Model_Url
$this->_rewrite = $rewrite;
return $requestPath;
}
+
+ // avoid unnecessary creation of new url_keys for duplicate url keys
+ $noSuffixPath = substr($requestPath, 0, -(strlen($suffix)));
@klein0r
klein0r / gist:5441524
Last active July 23, 2021 15:20 — forked from davidalexander/gist:1086455
Magento Tips, Tricks and Snippets
@IvanChepurnyi
IvanChepurnyi / config.xml
Created November 5, 2013 09:37
Disable Mage_Log module observers
<config>
<frontend>
<controller_action_predispatch>
<observers>
<log>
<type>disabled</type>
</log>
</observers>
</controller_action_predispatch>
<controller_action_postdispatch>
@h4cc
h4cc / satis_github_auth.sh
Created November 27, 2013 17:50
Some notes on how to authenticate with composer/satis against github oauth, so the rate limit of 60 will be raised op to 5000. Can also be used for travis-ci.
# Create a new Token
curl -u 'githubuser' -d '{"note":"Your Application"}' https://api.github.com/authorizations
# It is: "ebab4dc37e654bb230a9c69ebcd5f38e9a81e210"
#{
# "created_at": "2013-01-04T18:00:28Z",
# "app": {
# "url": "http://developer.github.com/v3/oauth/#oauth-authorizations-api",
@InvisibleKind
InvisibleKind / MyController.php
Last active May 14, 2019 14:00
FAL handling in FlexForms
public function indexAction() {
/** @var \TYPO3\CMS\Core\Resource\ResourceFactory $resourceFactory */
$resourceFactory = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\ResourceFactory');
$fileReference = $resourceFactory->getFileReferenceObject($this->settings['test']);
$fileArray = $fileReference->getProperties();
$this->view->assign('image', $fileArray);
}