Skip to content

Instantly share code, notes, and snippets.

View rbreve's full-sized avatar

Roberto Brevé rbreve

  • Finland
View GitHub Profile
.iamstudent {
background-color: #439e52;
-khtml-border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
border-style: none;
float: right;
margin-right: 170px;
@rbreve
rbreve / reset.css
Created August 3, 2011 22:37
reset pictour
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
margin: 0;
padding: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
@rbreve
rbreve / gist:1219039
Created September 15, 2011 11:25
async annotations
__block ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setCompletionBlock:^{
NSData *responseData = [request responseData];
//photo.thumbImage = [UIImage imageWithData:responseData];
UIImage *img = [UIImage imageWithData:responseData];
MapPoint *mp = [[MapPoint alloc] initWithCoordinate:coordinate title:@" "] ;
1 2:00 P.M. Introducción al evento Organizadores BarCamp
1 2:15 P.M. Uso de software libre y aplicaciones de código abierto Jamileth Velásquez
1 2:45 P.M. Software libre y su aplicación en la arquitectura Hector David Hernández
1 3:15 P.M. Realidad Aumentada, aplicaciones Eduardo Irías
1 3:45 P.M. Desarrollo con JavaScript y Node.js Alejandro Morales
4:15 P.M Break / Networking Todos los participantes
1 4:45 P.M. Hacking del lenguaje corporal Reniery O'Hara
1 5:15 P.M. Herramientas para mejorar la experiencia al desarrollar aplicaciones y sitios web Cristian Garner
1 5:45 P.M. El modelo de programación GPGPU José Alejandro Matute
1 6:15 P.M. Titulo pendiente Luis Felipe Borjas
- (void)updateFromJson:(NSDictionary *)json
{
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"yyyy-MM-dd'T'HHmmssZ"];
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"_(\\w)" options:0 error:NULL];
[json enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
if (obj == [NSNull null]) return;
if ([key isEqual:@"id"]) return;
NSString *_key = [key stringByReplacingOccurrencesOfString:@"class" withString:@"group"];
NSMutableString *newKey = [NSMutableString string];
/*
Google HTML5 slides template
Authors: Luke Mahé (code)
Marcin Wichary (code and design)
Dominic Mazzoni (browser compatibility)
Charles Chen (ChromeVox support)
URL: http://code.google.com/p/html5slides/
@rbreve
rbreve / gist:5127070
Created March 10, 2013 04:01
merge video
if (firstAsset !=nil && secondAsset!=nil) {
[activityView startAnimating];
// 1 - Create AVMutableComposition object. This object will hold your AVMutableCompositionTrack instances.
AVMutableComposition *mixComposition = [[AVMutableComposition alloc] init];
// 2 - Video track
AVMutableCompositionTrack *firstTrack = [mixComposition addMutableTrackWithMediaType:AVMediaTypeVideo
preferredTrackID:kCMPersistentTrackID_Invalid];
[firstTrack insertTimeRange:CMTimeRangeMake(kCMTimeZero, firstAsset.duration)
ofTrack:[[firstAsset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0] atTime:kCMTimeZero error:nil];
[firstTrack insertTimeRange:CMTimeRangeMake(kCMTimeZero, secondAsset.duration)
@rbreve
rbreve / satoshidice.py
Last active December 15, 2015 21:18
Sathoshi Dice simulator
import random
total_bitcoins=5
amount_to_bet=1
rounds=20
# probability -> multiplier
# 0.915527 -> 1.07
# 0.732422 -> 1.34
# 0.500000 -> 1.96
@rbreve
rbreve / satoshi.htm
Created April 6, 2013 06:13
Satoshi Dice Simulator Javascript
<!DOCTYPE html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<style type="text/css" media="screen">
body{font-family:helvetica;}
.abutton{width:350px;height:200px;}
.green{color:green;}
.red{color:red;}
function newCounter ()
local i = 0
return function ()
i=i+1
return i
end
end
c1 = newCounter()
print(c1()) --> 1
print(c1()) --> 2