Skip to content

Instantly share code, notes, and snippets.

View matteogobbi's full-sized avatar

Matteo Gobbi matteogobbi

View GitHub Profile
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@tfrank64
tfrank64 / PixelViewController.swift
Last active May 11, 2016 11:46
UI experiment using CRPixellatedView and the basic layout of MGSpotyViewController
//
// PixelViewController.swift
//
// Created by Taylor Franklin
//
import UIKit
class PixelViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
@matteogobbi
matteogobbi / cancel_dispatcher_by_flag.m
Last active August 29, 2015 13:57
Block execution by a flag of blocks queued with dispatch_after.
//Flag
_isCancelled = @(NO);
//Create a queue
dispatch_queue_t queue = dispatch_queue_create("queue", NULL);
//Insert 3.000 blocks executed with a delay of 1 sec
for (int i=0; i<3000; i++) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1* NSEC_PER_SEC)), queue, ^(void){
if(![_isCancelled boolValue])