Skip to content

Instantly share code, notes, and snippets.

View ppassmannpriv's full-sized avatar
🎯
Focusing

Pieter Paßmann ppassmannpriv

🎯
Focusing
View GitHub Profile
@jpommerening
jpommerening / cssTransform.polyfill.js
Last active August 29, 2015 14:14
CSS transform polyfill (work in progress)
;(function(window, document, Math, undefined) {
var ORIGIN_PATTERN = /\s*(-?[0-9.]+)(%?)\s+(-?[0-9.]+)(%?)\s*/;
var TRANSFORM_PATTERNS = [
/(matrix)\(\s*(-?[0-9.]+)\s*,\s*(-?[0-9.]+)\s*,\s*(-?[0-9.]+)\s*,\s*(-?[0-9.]+)\s*,\s*(-?[0-9.]+)\s*,\s*(-?[0-9.]+)\s*\)/,
/(translate)\(\s*(-?[0-9.]+)\s*,\s*(-?[0-9.]+)\s*\)/,
/(rotate|skew[XY])\(\s*(-?[0-9.]+)(deg|g?rad|turn)\s*\)/,
/(scale)\(\s*(-?[0-9.]+)(%?)\s*(?:,\s*(-?[0-9.]+)(%?)\s*)\)/
];
var TRANSFORM_FUNCTIONS = {
matrix: function (v0, v1, v2, v3, dx, dy) {
@bcremer
bcremer / ZendOpcache + APCu
Last active September 9, 2020 21:03
Alternative Bytecodecache + Datacache based on ZendOpcache and APCu
# http://pecl.php.net/package/APCu
# http://pecl.php.net/package/ZendOpcache
# Install ZendOpcache
sudo pecl install ZendOpcache-beta
sudo -i
cat > /etc/php5/mods-available/opcache.ini << EOF
zend_extension=/usr/lib/php5/20100525/opcache.so
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
@sthamann
sthamann / OrderMod_Bootstrap.php
Last active March 19, 2021 12:14
Advanced Example how to create 2 custom fields, fill them in order process, display them in backend order list as new columns and make them editable in order detail view
<?php
class Shopware_Plugins_Frontend_OrderMod_Bootstrap extends Shopware_Components_Plugin_Bootstrap
{
/**
* (non-PHPdoc)
* @see Shopware_Components_Plugin_Bootstrap::install()
*/
public function install()
{
@sthamann
sthamann / Bootstrap.php
Last active October 19, 2017 00:39
Shopware 4 - Add 2 new colums to Order-Model & fill them through order process
<?php
/**
* Shopware 4.0
* Copyright © 2012 shopware AG
*
* According to our dual licensing model, this program can be used either
* under the terms of the GNU Affero General Public License, version 3,
* or under a proprietary license.
*
* The texts of the GNU Affero General Public License with an additional
@tonyoconnell
tonyoconnell / gist:2351492
Last active August 21, 2023 17:35
Install Magento 1.8 With Sample Data By SSH
mkdir demo
cd demo
wget http://www.magentocommerce.com/downloads/assets/1.8.1.0/magento-1.8.1.0.tar.gz
wget http://www.magentocommerce.com/downloads/assets/1.6.1.0/magento-sample-data-1.6.1.0.tar.gz
tar -zxvf magento-1.8.1.0.tar.gz
tar -zxvf magento-sample-data-1.6.1.0.tar.gz
mv magento-sample-data-1.6.1.0/media/* magento/media/
mv magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql magento/data.sql
mv magento/* magento/.htaccess .
chmod o+w var var/.htaccess app/etc