Skip to content

Instantly share code, notes, and snippets.

View Qvatra's full-sized avatar

Oleksandr Zinchenko Qvatra

View GitHub Profile
@Qvatra
Qvatra / FixedMasonryLayout.js
Created March 26, 2015 10:50
fixed masonry layout for famous-flex LayoutController
/**
* This Source Code is licensed under the MIT license. If a copy of the
* MIT-license was not distributed with this file, You can obtain one at:
* http://opensource.org/licenses/mit-license.html.
*
* @author: Oleksandr Zinchenko (Qvatra)
* @license MIT
*/
/*global console*/
@borismus
borismus / gist:1032746
Created June 18, 2011 02:46
Convert a base64 string into a binary Uint8 Array
var BASE64_MARKER = ';base64,';
function convertDataURIToBinary(dataURI) {
var base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length;
var base64 = dataURI.substring(base64Index);
var raw = window.atob(base64);
var rawLength = raw.length;
var array = new Uint8Array(new ArrayBuffer(rawLength));
for(i = 0; i < rawLength; i++) {