I hereby claim:
- I am rabeawahab on github.
- I am rabeawahab (https://keybase.io/rabeawahab) on keybase.
- I have a public key ASALsUBGwZ57UO0lnsPmTnu7HpD4OmoYbTtOkyjaoOHLZQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/* | |
* The weathermap application. | |
*/ | |
var express = require('express'); | |
var request = require('request'); | |
// Rabea: checkout out Dotenv module, it is a better way of handling creds | |
var config = require('./config'); | |
var app = express(); |
public function retrieveCoupon($observer) | |
{ | |
$payment = $observer->getEvent()->getPayment(); | |
$order = $payment->getOrder(); | |
if ($code = $order->getCouponCode()) { | |
$coupon = Mage::getModel('salesrule/coupon')->load($code, 'code'); | |
$coupon->setTimesUsed($coupon->getTimesUsed()-1); | |
$coupon->save(); | |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
"runtime" | |
) | |
func init() { |
{ | |
"tests": [ | |
{ | |
"id": "test2", | |
"name": "EXAMPLE.com HomePage", | |
"browser": "PhantomJS", | |
"status": true, | |
"passedAssertions": 5, | |
"failedAssertions": 0, | |
"actions": [ |
module.exports = { | |
'EXAMPLE.com HomePage': function (test) { | |
// Just a random number | |
var now = Math.floor(Date.now() / 1000); | |
test | |
// Open EXAMPLE.com | |
.open('http://www.EXAMPLE.com') | |
$this->startSetup(); | |
/** | |
* Use those two commands to delete the attribute for testing | |
*/ | |
//$this->removeAttribute('catalog_category', 'custom_attribute_1'); | |
//$this->removeAttribute('catalog_category', 'custom_attribute_2'); | |
// creating the attributes |
<table> | |
<thead> | |
<tr><th>File Path</th> | |
<th>Event</th> | |
</tr></thead> | |
<tbody> | |
<tr> | |
<td>app/code/core/Mage/Customer/Model/Address/Abstract.php</td> | |
<td> 'customer_address_format'</td> | |
</tr> |
check process redis with pidfile /var/run/redis/redis.pid | |
start program = “/etc/init.d/redis start” | |
stop program = “/etc/init.d/redis stop” | |
if failed host 127.0.0.1 port 6379 then restart | |
if 5 restarts within 5 cycles then alert |
public function couponPostAction() | |
{ | |
/** | |
* No reason continue with empty shopping cart | |
*/ | |
if ($this->_expireAjax()) { | |
return; | |
} | |