Skip to content

Instantly share code, notes, and snippets.

View DmitrySkripkin's full-sized avatar
🤡

Dmitry Skripkin DmitrySkripkin

🤡
  • Russia
View GitHub Profile
@DmitrySkripkin
DmitrySkripkin / httpBuffer.example.js
Created September 29, 2016 12:11
httpBuffer.example.js
export class HttpBuffer {
constructor ($injector) {
'ngInject';
this.buffer = [];
this.$http = null;
this.$injector = $injector;
}
retryHttpRequest(config, deferred) {
@DmitrySkripkin
DmitrySkripkin / uint8clampedarray.js
Created September 28, 2016 08:42 — forked from gengkev/uint8clampedarray.js
Uint8ClampedArray shim
if (!window.Uint8ClampedArray && window.Uint8Array && window.ImageData) {
window.Uint8ClampedArray = function(input,arg1,arg2) {
var len = 0;
if (typeof input == "undefined") { }
else if (!isNaN(parseInt(input.length))) { //an array, yay
len = input.length;
}
else if (input instanceof ArrayBuffer) {
return new Uint8ClampedArray(new Uint8Array(input,arg1,arg2));
}