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 | |
/** | |
* This script creates a custom category attribute 'H1 Test' | |
* | |
* @link http://fabrizioballiano.net/2012/02/08/create-a-custom-category-attribute-in-magento/ | |
* | |
* @author Standa | |
* @version 2015-02-12 | |
*/ |
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
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; |
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 | |
ini_set('session.cookie_lifetime', 86400); | |
ini_set('session.gc_maxlifetime', 86400); | |
session_set_cookie_params(86400, dirname($_SERVER['REQUEST_URI'])); | |
session_start(); | |
require 'vendor/autoload.php'; |
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
#!/usr/bin/env php | |
<?php | |
// Upload as .git/hooks/post-commit | |
mail( | |
'[email protected]',. | |
implode(' ', array('[GIT]', trim(`hostname`), ' ', trim(`git log -n 1 --oneline`))), | |
`git log -n 1`, | |
implode(' ', array('From:', trim(`hostname`), 'git <[email protected]>')) |
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 | |
tail -f /var/log/nginx/error.log -f /www/var/log/exception.log -f /www/var/log/system.log |
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
server { | |
listen 80; | |
server_name localhost; | |
root /home/website/web; | |
rewrite ^/app\.php/?(.*)$ /$1 permanent; | |
try_files $uri @rewriteapp; | |
location @rewriteapp { |
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
// ----------------------------------------------------------------------------- | |
// @author standa | 2014-04-30 | Swiss Rechnung (BESR) | |
// not guaranteed 100% but seems to work for us | |
public function calculateCheckDigit($number) | |
{ | |
$matrix = array( | |
0 => array(0,9,4,6,8,2,7,1,3,5), | |
1 => array(9,4,6,8,2,7,1,3,5,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
<link rel="import" href="../paper-button/paper-button.html"> | |
<link rel="import" href="../core-animated-pages/core-animated-pages.html"> | |
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html"> | |
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html"> | |
<link rel="import" href="../core-animated-pages/transitions/slide-down.html"> | |
<link rel="import" href="../core-animated-pages/transitions/slide-up.html"> | |
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html"> | |
<link rel="import" href="../chart-js/chart-js.html"> | |
<polymer-element name="my-element"> |
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
UPDATE customer_entity | |
SET email=CONCAT(OLD_PASSWORD(email), '@example.com') | |
WHERE email NOT LIKE '%aardvark%' AND email NOT LIKE '%keyup%' AND email NOT LIKE '%grec.cz'; | |
UPDATE sales_flat_order_address | |
SET email=CONCAT(OLD_PASSWORD(email), '@example.com'); | |
UPDATE sales_flat_order | |
SET customer_email=CONCAT(OLD_PASSWORD(customer_email), '@example.com'); | |
UPDATE core_config_data |