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 / 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 / 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 / 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 / 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() {
@yalamber
yalamber / .gitignore
Created January 6, 2017 11:18
WordProject gitignore
/*
.DS_Store
!.gitignore
!wp-content/
# Ignore everything in the "wp-content" directory, except the "plugins"
# and "themes" directories.
wp-content/*
!wp-content/plugins/
!wp-content/themes/
@yalamber
yalamber / Braceschecker.js
Last active March 31, 2016 04:54
This function checks for braces
function bracesChecker(str) {
if(!str) {
return true;
}
var openingBraces = [’{’, ’[’, ’(’];
var closingBraces = [’}’, ’]’, ’)’];
var stack = [];
var openIndex;
var closeIndex;
//check for opening Braces in the val
# 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)