Skip to content

Instantly share code, notes, and snippets.

View mrkodssldrf's full-sized avatar

Mirko Düßeldorf mrkodssldrf

  • mrkodssldrf
  • Cologne, Germany
View GitHub Profile
@mrkodssldrf
mrkodssldrf / sha1
Created January 22, 2014 14:26
SlimFramework fast sha1 string hash
$app->get('/encrypt/:string', function ($string) use ($app) {
echo sha1($string);
}
);
@mrkodssldrf
mrkodssldrf / gist:891d934d10de2492344c
Created May 28, 2014 07:11
Vertical align elements without fixed height
---CSS
/* Helper to vertical align content*/
.vhelper { height: 100%; padding: 0;}
/* Vertical-Alignment without given height */
.vhelper, .justify-middle { display: inline-block; vertical-align: middle; }
---HTML
@mrkodssldrf
mrkodssldrf / default.phtml
Created June 24, 2014 09:28
Add Product Attributes to Magento Order Email
// File <yourtemplate>/email/order/items/order/default.phtml //
.......
<?php /** Get product attributes */ ?>
<?php $_product = Mage::getModel('catalog/product')->load($_item->getProduct()->getId()) ?>
<?php $_attributes = $_product->getAttributes() ?>
<?php $_arrDisplayAttributes = array('of_attributes_display') ?>
<?php foreach($_attributes as $_attribute) : ?>
<?php $_attributeCode = $_attribute->getAttributeCode() ?>
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-pages/core-pages.html">