Skip to content

Instantly share code, notes, and snippets.

View nayemmajhar's full-sized avatar

Nayem Majhar nayemmajhar

View GitHub Profile
@nayemmajhar
nayemmajhar / shopping_cart_sales_rule_with_coupon.php
Created September 16, 2023 11:00 — forked from antoinekociuba/shopping_cart_sales_rule_with_coupon.php
Magento - Create shopping cart price rule with a specific coupon code programmatically.
<?php
/**
* Create Shopping Cart Sales Rule with Specific Coupon Code Programmatically
*/
// All customer group ids
$customerGroupIds = Mage::getModel('customer/group')->getCollection()->getAllIds();
// SalesRule Rule model
$rule = Mage::getModel('salesrule/rule');
@nayemmajhar
nayemmajhar / Tree.hs
Created November 22, 2018 14:19 — forked from Kedrigern/Tree.hs
Implementation of binary search tree in Haskell
{- Implementation of BST (binary search tree)
Script is absolutly free/libre, but with no guarantee.
Author: Ondrej Profant -}
import qualified Data.List
{- DEF data structure -}
data (Ord a, Eq a) => Tree a = Nil | Node (Tree a) a (Tree a)
deriving Show