This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import hashlib | |
import datetime | |
import requests | |
""" | |
Usage: | |
client = IcepayClient(MERCHANT_ID, SECRET_CODE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import hashlib | |
import datetime | |
import requests | |
class IcepayClient: | |
BASE_API_URL = 'https://connect.icepay.com/webservice/api/v1/' | |
def __init__(self, merchant_id, secret_code): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
WORKDIR /opt | |
RUN apt-get update && \ | |
apt-get install -y wget xz-utils && \ | |
wget https://nodejs.org/dist/v6.3.1/node-v6.3.1-linux-x64.tar.xz && \ | |
tar -xf node-v6.3.1-linux-x64.tar.xz && \ | |
ln -s /opt/node-v6.3.1-linux-x64/bin/node -t /usr/local/bin && \ | |
ln -s /opt/node-v6.3.1-linux-x64/bin/npm -t /usr/local/bin | |
WORKDIR / | |
CMD node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
body { | |
background: white; | |
} | |
.ok { | |
color: green; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const callbacks = new Map(); | |
let id = 0; | |
const realRequestAnimationFrame = window.requestAnimationFrame; | |
window.requestAnimationFrame = function(cb) { | |
id++; | |
callbacks.set(id, cb); | |
return id; | |
} |