Skip to content

Instantly share code, notes, and snippets.

@d2s
d2s / install-go-to-with-bash-script.md
Last active May 10, 2023 22:45
Installing Go with command line

NOTE: This is heavily outdated Gist snippet from 2017.


Install Go language with a Bash script

Another alternative to installing Go is to use a simple Bash script. It will download and install Go language under of your own user account.

Note that a system-wide installation might be better for some things

@antoinekociuba
antoinekociuba / shopping_cart_sales_rule_with_coupon.php
Last active September 16, 2023 11:00
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');