Skip to content

Instantly share code, notes, and snippets.

View domasx2's full-sized avatar

Domas domasx2

  • Grafana Labs
  • Vilnius, Lithuania
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<style>
body {
background: white;
}
.ok {
color: green;
@domasx2
domasx2 / fix-raf.js
Created November 2, 2015 12:36
Wrap requestAnimationFrame to implement return value & cancelAnimationFrame
const callbacks = new Map();
let id = 0;
const realRequestAnimationFrame = window.requestAnimationFrame;
window.requestAnimationFrame = function(cb) {
id++;
callbacks.set(id, cb);
return id;
}
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
@domasx2
domasx2 / icepay.py
Last active September 15, 2016 16:21
icepay client in python
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):
@domasx2
domasx2 / icepay_client.py
Created September 15, 2016 17:15
python icepay client
import json
import hashlib
import datetime
import requests
"""
Usage:
client = IcepayClient(MERCHANT_ID, SECRET_CODE)