Skip to content

Instantly share code, notes, and snippets.

View rayhu's full-sized avatar
🎯
Focusing

Ray Hu rayhu

🎯
Focusing
  • Bay Area, CA, USA
  • 07:01 (UTC -07:00)
View GitHub Profile
const {PNG} = require('bundle.js');
const {Button, ImageView, ui} = require('tabris');
const base64 = require('base-64');
function _arrayBufferToBase64( buffer ) {
var binary = '';
var bytes = new Uint8Array( buffer );
var len = bytes.byteLength;
for (var i = 0; i < len; i++) {
binary += String.fromCharCode( bytes[ i ] );