Skip to content

Instantly share code, notes, and snippets.

View zeljkoprsa's full-sized avatar

Željko Prša zeljkoprsa

View GitHub Profile
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and PHP-FPM
sudo yum install -y nginx php-fpm
# Install PHP extensions
sudo yum install -y php-devel php-mysql php-pdo \
php-pear php-mbstring php-cli php-odbc \
@zeljkoprsa
zeljkoprsa / wanelo-button
Last active December 22, 2015 21:59
Wanelo button for Magento product page.
<div id="wanelo-button">
<a class="wanelo-save-button"
href="<?php echo $home_url; ?>"
data-url="<?php echo $this->helper('core/url')->getCurrentUrl();?>"
data-title="<?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?>"
data-image="<?php echo $_product->getImageUrl(); ?>"
data-price="<?php echo number_format($_product->getFinalPrice(),2);?>"></a>
<script async="true" type="text/javascript" src="//cdn-saveit.wanelo.com/bookmarklet/3/save.js></script>
</div>
# This is a basic VCL configuration file for PageCache powered by Varnish for Magento module.
# default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "8000";
.first_byte_timeout = 300s;
}
# add your Magento server IP to allow purges from the backend
#
# @author Jonathon byrd
#
############################################################
# first things first, set your iptables for a web server. If you jack these
# up you don't want to have to re-install your os after doing much more.
# @see http://www.thegeekstuff.com/2011/06/iptables-rules-examples/
# and
# @see https://help.ubuntu.com/community/IptablesHowTo
#
# @author Jonathon byrd
#
############################################################
# first things first, set your iptables for a web server. If you jack these
# up you don't want to have to re-install your os after doing much more.
# @see http://www.thegeekstuff.com/2011/06/iptables-rules-examples/
# and
# @see https://help.ubuntu.com/community/IptablesHowTo
@zeljkoprsa
zeljkoprsa / osx-scrollbar-visible.css
Created December 17, 2014 15:41
OSX Webkit Scrollbar allways visible.
/* Make scroll bar always visible on any element - Webkit on OSX */
::-webkit-scrollbar {
-webkit-appearance: none;
width: 7px;
}
::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: rgba(0, 0, 0, .5);
-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5);
}
@zeljkoprsa
zeljkoprsa / cms-static-block.xml
Created January 6, 2015 18:04
Add Cms static block via XML within appropriate store view
<STORE_de>
<reference name="left">
<block type="cms/block" name="cms_static_block_id_de">
<action method="setBlockId"><block_id>cms_static_block_id_de</block_id></action>
</block>
</reference>
</STORE_de>
<STORE_en>
<reference name="left">
<block type="cms/block" name="cms_static_block_id_en">
@zeljkoprsa
zeljkoprsa / viewport.xml
Created January 6, 2015 18:06
Set viewport meta via XML
<block type="core/text" name="head.viewport">
<action method="setText"><text><![CDATA[<meta name="viewport" content="initial-scale=1.0, width=device-width" />]]>&#10;</text></action>
</block>
@zeljkoprsa
zeljkoprsa / external-font.xml
Created January 6, 2015 18:07
Set external font reference via xml
<action method="addLinkRel"><rel>stylesheet</rel><href>//fonts.googleapis.com/css?family=PT+Sans:400,700,400italic</href></action>