Skip to content

Instantly share code, notes, and snippets.

View yalamber's full-sized avatar
🎯
Focusing

yalamber yalamber

🎯
Focusing
View GitHub Profile
@yalamber
yalamber / readme.md
Created August 11, 2022 20:42 — forked from Bodom78/readme.md
ANZ eGate Test Credit Cards

S2I Test Cards 2.4.5

The purpose of the mandatory testing is to ensure that your integration is performing correctly with the payment server and receiving the appropriate responses to display to your card holder. For example if an ‘insufficient funds’ or ‘invalid card’ response is returned it is important your integration can interpret this and display appropriately to your card holder.

To ensure there has been enough testing to identify any problems and to familiarize yourself with the product we require a minimum of 20 test transactions across all the scenarios.

Response Codes Testing

The information below is applicable only in the testing environment, i.e. when you are using your test merchant profile.

@yalamber
yalamber / mjpeg.js
Created April 14, 2020 09:30 — forked from cecilemuller/mjpeg.js
Emit a looped serie of images as an MJPEG stream using Node.js
'use strict';
const {readFileSync} = require('fs');
const {createServer} = require('http');
const {EventEmitter} = require('events');
let bufferIndex = -1;
const buffers = [
readFileSync('1.jpg'),
readFileSync('2.jpg'),
readFileSync('3.jpg'),
@yalamber
yalamber / action.js
Created November 26, 2018 19:31 — forked from benpickles/action.js
Inject an Authorization header into a redux-api-middleware request with a Redux middleware.
import { CALL_API } from 'redux-api-middleware'
export function fetchLocations() {
return {
[CALL_API]: {
endpoint: 'http://api.somesite.com/api/locations',
method: 'GET',
// Don't have to manually add the Authorization header to every request.
headers: { 'Content-Type': 'application/json' },
types: ['REQUEST', 'SUCCESS', 'FAILURE']
<?php
/*
Plugin Name: Taxonomy Sync
Version: 0.1
*/
 
// Taxonomies
$taxonomies_to_sync = array( 'an', 'array', 'of', 'taxonomies', 'to', 'sync' ); // Change These!
 
function ms_taxonomy_sync_add_menu() {
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "8080";
.connect_timeout = 60s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
.max_connections = 800;
}
# Configuration file for varnish
#
# /etc/init.d/varnish expects the variables $DAEMON_OPTS, $NFILES and $MEMLOCK
# to be set from this shell script fragment.
#
# Should we start varnishd at boot? Set to "no" to disable.
START=yes
# Maximum number of open files (for ulimit -n)
function export_connect_csv(user_id, res){
ConnectModel.mysqlPool.getConnection(function(err, connection){
res.header('Content-Type', 'text/csv');
var csv_header_row = "Email,First Name,Last Name,Status,Created\n";
res.write(csv_header_row);
var query = connection.query('SELECT * FROM connects where user_id = ? AND deleted = 0', [user_id]);
query
.on('error', function(err) {
function export_connect_csv(user_id, res){
ConnectModel.mysqlPool.getConnection(function(err, connection){
res.header('Content-Type', 'text/csv');
var csv_header_row = "Email,First Name,Last Name,Status,Created\n";
res.write(csv_header_row);
var query = connection.query('SELECT * FROM connects where user_id = ? AND deleted = 0', [user_id]);
query
.on('error', function(err) {