Skip to content

Instantly share code, notes, and snippets.

View Scarbous's full-sized avatar
🧐

Sascha Heilmeier Scarbous

🧐
  • netlogix GmbH & Co. KG
  • Germany
View GitHub Profile
@gre
gre / easing.js
Last active June 27, 2024 15:37
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@havvg
havvg / AbstractTest.php
Created June 1, 2012 14:22
PHPUnit mock Interface extending Iterator
<?php
namespace Ormigo\Tests;
abstract class AbstractTest extends \PHPUnit_Framework_TestCase
{
/**
* Apply expectations for an \Iterator on a mock object.
*
* @see http://php.net/Iterator
@werdan
werdan / Magento cron lister
Last active July 2, 2021 22:15
This script lists all Magento cronjobs in the following way: # php listAllCrons.php Job name m h dom mon dow Object::Method to execute enterprise_giftcardaccount_generage_codes_pool 30 * * * * enterprise_giftcardaccount/pool::applyCodesGeneration enterprise_logging_rotate_logs 1 2 * * * enterprise_logging/observer::rotateLogs enterprise_page_cac…
<?php
// shell/listAllCron.php
require_once 'abstract.php';
class Mage_Shell_CronLister extends Mage_Shell_Abstract
{
public function run()
{
$cronJobs = Mage::app()->getConfig()->getNode('crontab/jobs');
@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);
}
@oliverthiele
oliverthiele / LocalConfiguration.php
Created December 11, 2014 13:12
Redis Configuration in TYPO3
<?php
return array(
// ...
'SYS' => array(
'caching' => array(
'cacheConfigurations' => array(
'cf_cache_hash' => array(
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend',
'options' => array(
'database' => 10,
@yvoronoy
yvoronoy / CODE_AND_DB_DUMP.MD
Last active April 26, 2023 08:35 — forked from tshabatyn/CODE_AND_DB_DUMP.MD
How to Generate Magento2 Code and DB dumps

Code dump

You can use tiny script m2dump it is doing the same thing as described below.

Estimate size of directories and exclude no needed.

du -sh ./* | sort -h
@manuelselbach
manuelselbach / HowToAddACustomElementForTheFormEditorOfExtForm.md
Last active May 23, 2024 21:40
How to add a custom element for the formEditor of ext:form

EXT:form How to add a custom form element

If you like to add a custom form element, please follow these steps. For detailed information and documentation of ext:form please visit the official documentation: https://docs.typo3.org/typo3cms/extensions/form/Index.html

Basics

First of all create a new extension, which will hold all the configuration, templates, etc.

@htuscher
htuscher / .gitlab-ci.yml
Created August 3, 2017 08:12
Deploying with docker-compose via SSH tunnel in Gitlab CI
deploy:live:
image: 1drop/docker:git
stage: deploy
when: manual
environment:
name: production
url: https://www.somecustomer.de
before_script:
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
@eyecatchup
eyecatchup / powermailtracking.js
Last active November 19, 2021 06:30
Universal event tracking solution for TYPO3 Powermail XHR submissions.
// Universal event tracking for TYPO3 Powermail XHR submissions.
//
// Note: As of version 4.2.0, Powermail sends a custom event on submit;
// see https://github.com/einpraegsam/powermail/blob/develop/Documentation/Faq/Index.rst#how-can-i-add-a-callback-function-on-ajax-submit
document.addEventListener("DOMContentLoaded", function(event) {
// Step 1
// Attach an onsubmit handler to all powermail ajax forms, which will
// make the powermail form id available in the window object on submit.
var forms = document.querySelectorAll('form');
for (var i in forms) {