Skip to content

Instantly share code, notes, and snippets.

View telime's full-sized avatar
🏠
Working from home

hiroro terara telime

🏠
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am telime on github.
  • I am hiroroterara (https://keybase.io/hiroroterara) on keybase.
  • I have a public key ASDS_FNNeqBsbZ1-XOgR8TLnzYA3WoFCeXCB-5aVQdcyXQo To claim this, I am signing this object:
{
  "body": {
    "key": {
@telime
telime / azureFaceDetection.js
Created May 24, 2018 08:55
Sample to send Canvas data to Azure Face API using jQuery
function data2blob(dataurl, type) {
var bin = atob(dataurl.split(',')[1]);
var buffer = new Uint8Array(bin.length);
for (var i = 0; i < bin.length; i++) {
buffer[i] = bin.charCodeAt(i);
}
return new Blob([buffer], {type: type});
}
// Replace <Subscription Key> with your valid subscription key.
@telime
telime / gcpFaceDetection.js
Last active May 24, 2018 08:56
Sample to send Canvas data to Google Cloud Vision API using jQuery
// Replace <API Key> with your valid API key.
var apiKey = "<API Key>";
var uriBase = "https://vision.googleapis.com/v1/images:annotate";
// Request parameters.
// Replace <BASE64 DATA> with BASE64 data from canvas.toDataURL().
var params = {
"requests":[
{
"image": {
@telime
telime / ecma262polyfills.js
Created May 24, 2018 08:30
ECMA-262 ES5 Polyfills
/*
ECMA-262 ES5 Polyfills
edit hiroshi terashima 201609
developer.mozilla.orgで入手できるShimをまとめたファイルです。
古い環境でも新しい機能を利用できるように調整します。
window.CustomEvent
Object.create
Array.prototype.forEach
@telime
telime / css3-marquee.css
Last active May 26, 2018 18:53
css3 emulated marquee tag
.marquee {
overflow:hidden;
display: block;
width: 100%;
}
.marquee > * {
margin: 0;
padding-left: 100%;
display: inline-block;