Skip to content

Instantly share code, notes, and snippets.

View inash's full-sized avatar

Inash Zubair inash

View GitHub Profile
/** Import the net nodejs package. */
var connect = require('net');
function Izs(host, port) {
/** Field object type to define a field for Izs message fields. */
var Field = function(name, length, value, justify) {
if (name == null) throw new Error('a name has to be specified for a field.');
if (length == null) length = 0;
if (value == null) value = '';
@inash
inash / mpg-sample.php
Created June 30, 2014 09:04
MPG class for signature generation
<?php
require_once 'mpg.php';
$mpg = new Mpg(array(
'merchantId' => '980xxxxxxx',
'merchantResponseUrl' => 'https://example.com/response',
'transactionPassword' => 'xxxxxxxx',
'orderId' => 'XXX12341234',
'amount' => '149.99'));
@inash
inash / Session.scala
Created April 12, 2016 19:47
Overridden version of xitrum.hazelcast.Session store to limit a user to a single session
package test.hazelcast
import com.hazelcast.core.IMap
import xitrum.hazelcast.{Hz, Session ⇒ HazelcastSession}
/** Overridden version of xitrum.hazelcast.Session store to limit a user to a
* single session.
*/
class Session extends HazelcastSession {
private[this] lazy val store = Hz.instance.getMap("xitrum/session").asInstanceOf[IMap[String, Map[String, Any]]]