Skip to content

Instantly share code, notes, and snippets.

View SuperStar518's full-sized avatar
:octocat:
no pains, no gains

SuperStar518 SuperStar518

:octocat:
no pains, no gains
View GitHub Profile
@tmarshall
tmarshall / aws-sns-example.js
Last active October 30, 2022 06:12
aws-sdk sns example, in Node.js
var AWS = require('aws-sdk');
AWS.config.update({
accessKeyId: '{AWS_KEY}',
secretAccessKey: '{AWS_SECRET}',
region: '{SNS_REGION}'
});
var sns = new AWS.SNS();
@exinferis
exinferis / gist:4216799
Created December 5, 2012 15:53
Convert Data URI to JS blob - Javascript
dataURItoBlob = function(dataURI) {
var array, binary, i;
binary = atob(dataURI.split(",")[1]);
array = [];
i = 0;
while (i < binary.length) {
array.push(binary.charCodeAt(i));
i++;
}
return new Blob([new Uint8Array(array)], {