Skip to content

Instantly share code, notes, and snippets.

View yalamber's full-sized avatar
🎯
Focusing

yalamber yalamber

🎯
Focusing
View GitHub Profile
@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']
@yalamber
yalamber / slate-firebase-img.js
Created May 3, 2019 09:45
Slate Firebase storage image upload
import React from 'react';
import { getEventRange, getEventTransfer } from 'slate-react';
import { Circle } from 'rc-progress';
import imageExtensions from 'image-extensions';
import isUrl from 'is-url';
import styled from '@emotion/styled';
const Image = styled('img')`
display: block;
max-width: 100%;
@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 / gist:c0c474c298b7dbe08024a90c66a77a45
Created December 23, 2021 17:04
Using Iotex rpc readstate with iotex-antenna
import React, { useEffect } from 'react';
import { observer } from 'mobx-react-lite';
import RpcMethod from 'iotex-antenna/lib/rpc-method';
import { IReadStakingDataMethodToBuffer, IReadStakingDataMethodName, IReadStakingDataRequestToBuffer } from 'iotex-antenna/lib/rpc-method/types';
import { VoteBucketList } from 'iotex-antenna/protogen/proto/types/state_data_pb';
import { from } from '@iotexproject/iotex-address-ts';
import { Container } from '@chakra-ui/react';
import { ToolConfig } from '../../config/ToolConfig';
import { Badge, Flex, Text } from '@chakra-ui/layout';
@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.