This file contains 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
git remote add bitbucket /url/to/am/empty/bitbucket/repo | |
git push --mirror bitbucket |
This file contains 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
# Add new user group | |
groupadd sftpusers | |
# Add new user set the directory, the main role and the user name | |
useradd -g sftpusers -d /dir -s /sbin/nologin username | |
# Make sure the user can perform SSH login | |
usermod username -s /sbin/nologin | |
# Make sure the user has been added |
This file contains 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="../paper-progress/paper-progress.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; |
This file contains 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-pages/core-pages.html"> | |
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html"> | |
<link rel="import" href="../core-menu/core-submenu.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-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> |
This file contains 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-ajax/core-ajax.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../topeka-elements/category-images.html"> | |
<link rel="import" href="../core-icons/av-icons.html"> | |
<link rel="import" href="../paper-fab/paper-fab.html"> |
This file contains 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
function countProperties(obj) { | |
var prop; | |
var propCount = 0; | |
for (prop in obj) { | |
propCount++; | |
} | |
return propCount; | |
} |
This file contains 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
array(50) { | |
["product_id"]=> | |
string(3) "184" | |
["description"]=> | |
string(454) "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam bibendum nunc dictum, elementum tortor at, aliquet odio. Suspendisse accumsan semper leo non ornare. Quisque lacinia quis orci id ultricies. Praesent interdum urna vitae tempus vulputate. In vel lobortis mauris. Cras diam mi, scelerisque quis interdum eu, congue in elit. Mauris tincidunt convallis nulla, quis mollis nisi luctus nec. Donec risus enim, congue ac sodales et, aliquam eget justo" | |
["image"]=> | |
string(134) "http://progress.devshopgo.me/media/catalog/product/cache/4/image/265x/9df78eab33525d08d6e5fb8d27136e95/s/h/shutterstock_96360692_1.jpg" | |
["internal"]=> | |
array(1) { | |
["currency"]=> |
This file contains 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
/** | |
* Convert an image | |
* to a base64 string | |
* @param {String} url | |
* @param {Function} callback | |
* @param {String} [outputFormat=image/png] | |
*/ | |
function convertImgToBase64(url, callback, outputFormat){ | |
var canvas = document.createElement('CANVAS'), | |
ctx = canvas.getContext('2d'), |
This file contains 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 | |
// Clear Magento cart and quote items | |
$cart = Mage::getModel('checkout/cart'); | |
$cart->truncate()->save(); // remove all active items in cart page | |
$cart->init(); | |
$session= Mage::getSingleton('checkout/session'); | |
$quote = $session->getQuote(); | |
$cart = Mage::getModel('checkout/cart'); |