2014-08-22 08:55:42 +03:00
function Schedule ( ) {
var events = [ ] ;
this . addEvent = function ( event ) {
events . push ( event ) ;
events = _ . sortBy ( events , function ( event ) {
return event . startTime . unix ( )
} ) ;
}
this . upcomingEvents = function ( ) {
return _ . select ( events , function ( event ) {
return event . startTime . isAfter ( moment ( ) ) ;
} ) ;
}
this . nextEvent = function ( ) {
return _ . first ( this . upcomingEvents ( ) ) ;
}
this . currentEvent = function ( ) {
var latestEvent = _ . last ( this . pastEvents ( ) ) ;
var nextEvent = this . nextEvent ( ) ;
if ( typeof nextEvent != 'undefined' && moment ( nextEvent . startTime ) . subtract ( 'minutes' , 10 ) . isAfter ( moment ( ) ) ) {
return latestEvent ;
} else {
return undefined ;
}
}
this . futureEvents = function ( ) {
return this . upcomingEvents ( ) . splice ( 1 ) ;
}
this . pastEvents = function ( ) {
return _ . select ( events , function ( event ) {
return event . startTime . isBefore ( moment ( ) ) ;
} ) ;
}
this . allEvents = function ( ) {
return events ;
}
this . addDelay = function ( time ) {
_ . each ( this . upcomingEvents ( ) , function ( event , index , agenda ) {
event . startTime . add ( time ) ;
} ) ;
}
}
var schedule = new Schedule ( ) ;
schedule . addEvent ( {
2014-08-23 12:21:17 +03:00
title : ' SyContent - Content in the Cloud with V8 ' ,
startTime : moment ( { hour : 10 , minute : 00 } ) ,
2014-08-22 08:55:42 +03:00
speakers : [
{
2014-08-23 12:21:17 +03:00
name : 'Torsten Raudssus ( Getty )' ,
2014-08-22 08:55:42 +03:00
description : ''
}
]
} ) ;
schedule . addEvent ( {
2014-08-23 12:21:17 +03:00
title : ' Docker with Perl - an Introduction ' ,
startTime : moment ( { hour : 11 , minute : 00 } ) ,
2014-08-22 08:55:42 +03:00
speakers : [
{
2014-08-23 12:21:17 +03:00
name : 'Denis Banovic ( @bano99 )' ,
description : ''
2014-08-22 08:55:42 +03:00
}
]
} ) ;
schedule . addEvent ( {
2014-08-23 12:21:17 +03:00
title : 'Create your containers with perl ' ,
startTime : moment ( { hour : 11 , minute : 30 } ) ,
2014-08-22 08:55:42 +03:00
speakers : [
{
2014-08-23 12:21:17 +03:00
name : 'Marian Marinov ( HackMan )' ,
description : ''
2014-08-22 08:55:42 +03:00
}
]
} ) ;
schedule . addEvent ( {
2014-08-23 12:21:17 +03:00
title : 'Lunch 🍔' ,
startTime : moment ( { hour : 12 , minute : 20 } )
} ) ;
schedule . addEvent ( {
title : ' Automatization Network infrastructure ' ,
startTime : moment ( { hour : 13 , minute : 20 } ) ,
2014-08-22 08:55:42 +03:00
speakers : [
{
2014-08-23 12:21:17 +03:00
name : 'Naim Shafiyev ( shafiev )' ,
description : 'The student of MIREA. Interests: GCC, Linux kernel, OpenBSD, PERL, Parrot, Catalyst, Search engines'
2014-08-22 08:55:42 +03:00
}
]
} ) ;
schedule . addEvent ( {
2014-08-23 12:21:17 +03:00
title : 'Building an AWS SDK for Perl ' ,
startTime : moment ( { hour : 13 , minute : 50 } ) ,
2014-08-22 08:55:42 +03:00
speakers : [
{
2014-08-23 12:21:17 +03:00
name : 'Jose Luis Martinez Torres' ,
2014-08-22 08:55:42 +03:00
description : ''
}
]
} ) ;
schedule . addEvent ( {
2014-08-23 12:21:17 +03:00
title : 'Perl in the Cloud - Update ' ,
startTime : moment ( { hour : 14 , minute : 50 } ) ,
2014-08-22 08:55:42 +03:00
speakers : [
{
2014-08-23 12:21:17 +03:00
name : 'Denis Banovic ( @bano99 )' ,
description : 'Denis Banovic has over 13 years of experience as a senior software developer, system administrator and team leader. Currently he is busy creating and implementing Cloud Applications for the tourism industry in Austria. In his spare time, Denis\' interests include rockets, photography, traveling and psychology.'
2014-08-22 08:55:42 +03:00
}
]
} ) ;
schedule . addEvent ( {
title : 'Coffee Break ☕' ,
startTime : moment ( { hour : 15 , minute : 40 } )
} ) ;