Skip to content

Instantly share code, notes, and snippets.

View adampiotrowski's full-sized avatar

Adam Piotrowski adampiotrowski

View GitHub Profile
{% extends 'WellCommerceAppBundle:Front:layout.html.twig' %}
{% trans_default_domain "wellcommerce" %}
{% block content %}
{% if payment.isApproved() %}
<div class="container">
<div class="col-xl-8 col-lg-10">
<div class="payment-box">
<div class="box-heading">
<h5>Dziękujemy za dokonanie płatności!</h5>
</div>
<?php
class WellCommerceClient
{
public function __construct($url, $apikey)
{
$this->url = $url;
$this->key = $apikey;
$this->id = 1;
}
@adampiotrowski
adampiotrowski / wkhtml
Created March 28, 2017 10:59
Installing WKHTML
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar xf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
sudo apt-get install openssl build-essential xorg libssl-dev
./wkhtmltopdf --version
#!/usr/bin/env bash
action=$1
components=("Breadcrumb" "Collections" "DataGrid" "DataSet" "DoctrineEnhancer" "Form" "Layout" "Search" "Serializer")
bundles=("ApiBundle" "AppBundle" "CatalogBundle" "CmsBundle" "CoreBundle" "CouponBundle" "GeneratorBundle" "OAuthBundle" "OrderBundle" "ReviewBundle" "RoutingBundle" "SearchBundle" "ShowcaseBundle" "WishlistBundle")
if [ "$action" == 'test' ]
then
for i in "${components[@]}"
do
<?php
namespace RedIsBad\Bundle\AppBundle\Provider;
use WellCommerce\Bundle\CoreBundle\DependencyInjection\AbstractContainerAware;
use WellCommerce\Bundle\ShippingBundle\Provider\ShippingMethodOptionsProviderInterface;
/**
* Class InpostOptionsProvider
*
* @package RedIsBad\Bundle\AppBundle
*/
class InpostOptionsProvider extends AbstractContainerAware implements ShippingMethodOptionsProviderInterface
<?php
/*
* WellCommerce Open-Source E-Commerce Platform
*
* This file is part of the WellCommerce package.
*
* (c) Adam Piotrowski <[email protected]>
*
* For the full copyright and license information,
* please view the LICENSE file that was distributed with this source code.
@adampiotrowski
adampiotrowski / results.md
Last active March 6, 2016 16:31
PHP7 vs PHP 5.6

ab -n 500 -c 10 http://demo.wellcommerce.org/

Tests made on UpCloud by using 2 separate backups. Only PHP version was updated and APCu installed.

PHP 7 with APCu (cache driver for Doctrine)

Server Software:        Apache/2.4.16
Server Hostname:        demo.wellcommerce.org
Server Port:            80
#!/usr/bin/env bash
# Usage: ./upcloud.sh domain.com preferred_mysql_root_password
# Setup variables
DOMAIN=$1
MYSQL_PASSWORD=$2
SITES_ENABLED='/etc/apache2/sites-enabled/'
SITES_AVAILABLE='/etc/apache2/sites-available/'
USER_DIR='/var/www/domains/'
<?php
/*
* WellCommerce Open-Source E-Commerce Platform
*
* This file is part of the WellCommerce package.
*
* (c) Adam Piotrowski <[email protected]>
*
* For the full copyright and license information,
* please view the LICENSE file that was distributed with this source code.
@adampiotrowski
adampiotrowski / upcloud_lamp.sh
Last active April 9, 2020 12:56
LAMP setup for UpCloud.com
#!/usr/bin/env bash
# Usage:
# $ wget https://gist.githubusercontent.com/adampiotrowski/950db90454488b52aaf5/raw/987bbcf1211468db54ff102a19a69ec69627af96/upcloud_lamp.sh
# $ chmod +x upcloud_lamp.sh
# $ ./upcloud.sh domain.com preferred_mysql_root_password
# Setup variables
DOMAIN=$1
MYSQL_PASSWORD=$2