Skip to content

Instantly share code, notes, and snippets.

View matrunchyk's full-sized avatar
🇺🇦
If you want to go fast, go alone. If you want to go far, bring others along.

Serhii Matrunchyk matrunchyk

🇺🇦
If you want to go fast, go alone. If you want to go far, bring others along.
View GitHub Profile
<?php
public function renderSamplePage($data) {
$view = new \ThemeView('sample_page', $data);
$view->render();
}
@matrunchyk
matrunchyk / ThemeView.php
Last active May 18, 2016 19:00
ThemeView Decorator
<?php
class ThemeView
{
private $args;
private $file;
public function __get($name)
{
return $this->args[$name];
diff --git a/actions/admin/settings/131.ssl.php b/actions/admin/settings/131.ssl.php
index 016de80..113de12 100644
--- a/actions/admin/settings/131.ssl.php
+++ b/actions/admin/settings/131.ssl.php
@@ -40,6 +40,15 @@ return array(
'default' => 'ECDH+AESGCM:ECDH+AES256:!aNULL:!MD5:!DSS:!DH:!AES128',
'save_method' => 'storeSettingField',
),
+ 'system_ssl_letsencrypt_path' => array(
+ 'label' => $lng['serversettings']['ssl']['ssl_letsencrypt_path'],
@matrunchyk
matrunchyk / loader.php
Last active October 15, 2015 09:58
Proposal for OpenCart guys
<?php
// ...
public function model($model, $data = array()) {
// $this->event->trigger('pre/model/' . str_replace('/', '.', (string)$model), $data);
$model = str_replace('../', '', (string)$model);
/* <custom_model_support> */
@matrunchyk
matrunchyk / OCMod "Custom Model Support"
Created October 15, 2015 09:50
Adds a support for custom OpenCart models
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Custom Model Support</name>
<code>custom_model_support</code>
<version>1.0</version>
<author>Sergii Matrunchyk</author>
<link>mailto: sergiy.matrunchyk@gmail.com</link>
<file path="system/engine/loader.php">
<operation>
<search trim="true"><![CDATA[
@matrunchyk
matrunchyk / OpenCart update script
Last active October 14, 2015 21:38
Use: update.sh /absolute/path/of/your/OpenCart/installation. Read this post for details: http://easywebthings.blogspot.com/2015/10/opencart-upgrade-script.html
#!/bin/bash
RED='\033[0;31m'
YELLOW='\033[0;33m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
dest=$1
keep_local=(