Skip to content

Instantly share code, notes, and snippets.

View marcolink's full-sized avatar
🪐

Marco Link marcolink

🪐
View GitHub Profile
@marcolink
marcolink / 0_reuse_code.js
Last active August 29, 2015 14:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@marcolink
marcolink / gist:c627c6f965cbdbba88d1
Last active March 4, 2016 19:17
Image Flash to Facebook
post_image_to_facebook: function(d, f) {
var flashData = f[0];
var bs = window.atob( flashData.image ); // data from flash without mime type and base64 identifier
var ia = new Uint8Array(bs.length);
for (var i = 0, a = bs.length; i < a; i++) {
ia[i] = bs.charCodeAt(i);
};
@marcolink
marcolink / gist:6077904
Last active December 20, 2015 05:19
ByteArray Segmentation
class ByteArrayHelper
{
public static function getSegments(source : ByteArray, size: int = 1000) : Array
{
var result : Array = [];
if(!source)
{
return result;