Skip to content

Instantly share code, notes, and snippets.

View gunjanpatel's full-sized avatar

Gunjan Patel gunjanpatel

View GitHub Profile
@gunjanpatel
gunjanpatel / createSvnUser.md
Last active December 17, 2015 07:39
How to create SVN ( subversion / svn ) user using command line in Linux.

Create SVN Authenticaiton user using htpasswd in Linux

  • Open Terminal ( Ctrl + Alt + t )
  • Go to etc directory using cd command
cd /etc/
  • Check for availability of svn-auth-conf using command
<?php
$rsUserhelper = new rsUserhelper;
$shopper_group_id = $rsUserhelper->getShopperGroup($user->id);
$shopper_group_data = $rsUserhelper->getShopperGroupList($shopper_group_id);
echo "<pre>";
print_r($shopper_group_data);
echo "</pre>";
@gunjanpatel
gunjanpatel / proportional_resizing.patch
Created June 12, 2013 12:57
Incorrect thumbnail size (for redSHOP 1.2 or previous releases) fix - Automatic Process
Index: administrator/components/com_redshop/controllers/configuration.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- administrator/components/com_redshop/controllers/configuration.php (revision )
+++ administrator/components/com_redshop/controllers/configuration.php (revision )
@@ -253,8 +253,8 @@
echo $msg = JText::_('COM_REDSHOP_NEWSLETTER_SEND_TO_TEST_EMAIL');
}
@gunjanpatel
gunjanpatel / discount_shopper_group_price.patch
Created June 19, 2013 10:00
redSHOP discount for shopper group is not working. Apply this patch to fix discount for shopper group issue.
Index: components/com_redshop/helpers/product.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- components/com_redshop/helpers/product.php (revision )
+++ components/com_redshop/helpers/product.php (revision )
@@ -188,53 +188,78 @@
public function getProductSpecialPrice($product_price, $discount_product_id, $product_id = 0)
@gunjanpatel
gunjanpatel / git tag.md
Created June 26, 2013 11:42
working with git tag

How to: Create a remote Git tag

  • Simply listing the available tags in Git is very straightforward. Just type ‘git tag’.
$ git tag
0.1
1.3
@gunjanpatel
gunjanpatel / phpEnvVariable.md
Last active December 19, 2015 01:09
php pear installation | windows environmental variables

Pear BIN

Variable: PHP_PEAR_BIN_DIR

Value: D:\Development\xampp\php

Pear DATA

Variable: PHP_PEAR_DATA_DIR

@gunjanpatel
gunjanpatel / product_order_in_backend_listing page.patch
Created July 2, 2013 04:37
This patch is a fix for redSHOP product back-end sorting / ordering issue for version 1.2 and lower.
From 0d297c73af187e5eedd2b3d36ddbca79251fcea4 Mon Sep 17 00:00:00 2001
From: Gunjan Patel <gunjan@redcomponent.com>
Date: Fri, 17 May 2013 17:43:24 +0530
Subject: [PATCH 1/3] fix sorting issue on product listing page
---
component/admin/models/product.php | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/component/admin/models/product.php b/component/admin/models/product.php
(F)(F)(F)(F)(F)(F) (F)(F)(F)(F)(F)(F)(F)
(F)(F)(F):*:*:*(F):* :*:*(F)(F)(F)
(F):*:*(h)(h):*:*:* (h)(h):*:*(F)
:*:*(h)(h)(h)(h):* (h)(h)(h)(h):*:*
:*:*(h)(h)(h)(h) (h)(h)(h)(h)(h):*:*
(F):*:*(h)(h)(h) (h)(h)(h)(h):*:*(F)
(F)(F):*:*(h)(h) (h)(h)(h):*:*(F)(F)
(F)(F)(F):*:*(h) (h)(h):*:*(F)(F)(F)
(F)(inlove)(F)(F) :*:*(h):*:*(F)(F)(inlove)(F)
(F)(inlove)(F)(F) (F):*:*:*(F)(F)(F)(inlove)(F)
@gunjanpatel
gunjanpatel / ConsoleLog.sublime-snippet
Created July 9, 2013 05:38
change.log sublime text 2 code snippet
<snippet>
<content><![CDATA[console.log(${1});]]></content>
<tabTrigger>cl</tabTrigger>
<description>console.log();</description>
<scope>source.js</scope>
</snippet>
@gunjanpatel
gunjanpatel / regular expression.md
Last active December 30, 2015 09:00
Use full Regular Expression with redSHOP using Sublime Text 2 or 3 and PhpStorm

Find for loop for Code Style improvement by calculate the length of the loop in advance

Target: for ($i = 0; $i < count($columns); $i++)

Search: \(((\$\w) = \d); \$\w\s<\s(count\(\$(\w+)\)); (\$\w\+\+)\)

Replace: ($1, $2n = $3; $2 < $2n; $5)

Get string between