Skip to content

Commit

Permalink
added some images and the timer
Browse files Browse the repository at this point in the history
  • Loading branch information
schacon committed Jul 23, 2010
1 parent 5126351 commit e0ddec4
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 1 deletion.
11 changes: 10 additions & 1 deletion preso/01_slide.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
![](img/octocat.png)
## github.com ##

!SLIDE center
![](img/search.png)

!SLIDE
# get more stable, tested code than NIH #

Expand Down Expand Up @@ -105,8 +108,8 @@ unicorn-0.97.0<br/>
# developers create ties in the community #

* network to ask questions / learn from
* recruit from
* cross pollination
* recruit from

!SLIDE
# get free work #
Expand Down Expand Up @@ -138,6 +141,9 @@ unicorn-0.97.0<br/>
!SLIDE
# have customers add features #

!SLIDE center
![](img/servicehooks.png)

!SLIDE
# github-services #
### github.com/github/github-services ###
Expand Down Expand Up @@ -377,6 +383,9 @@ unicorn-0.97.0<br/>
!SLIDE
# more ideas #

!SLIDE
# dumb ideas are not worked on #

!SLIDE bullets incremental
# keep your devs #

Expand Down
Binary file added preso/img/search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preso/img/servicehooks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 70 additions & 0 deletions timer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
var timerSetUp = false;
var timerRunning = false;
var intervalRunning = false;
var seconds = 0;
var totalMinutes = 35;

function setUpTimer()
{
if (timerSetUp) { return; }

timerSetUp = true;

$("#slideInfo").after(' <span id="timerInfo"></span> &nbsp; <img id="progressIcon"/>');

$(document).keydown(function(event) {
var key = event.keyCode;
if (event.ctrlKey || event.altKey || event.metaKey) { return; }

if (key == 89) // y for timer
{
toggleTimer();
}
});
}

function toggleTimer()
{
if (!timerRunning) {
timerRunning = true
$("#timerInfo").text(timerStatus(0));
seconds = 0
if (!intervalRunning) {
intervalRunning = true
setInterval(function() {
if (!timerRunning) { return; }
seconds++;
$("#timerInfo").text(timerStatus(seconds));
}, 1000); // fire every minute
}
} else {
seconds = 0
timerRunning = false
$("#timerInfo").text('')
}
}

function timerStatus(seconds) {
var minutes = Math.round(seconds / 60);
var left = (totalMinutes - minutes);
var percent = Math.round((minutes / totalMinutes) * 100);
var progress = getSlidePercent() - percent;
setProgressIcon(progress);
return ' - (' + minutes + '/' + left + ':' + percent + '%)';
}

function setProgressIcon(progress) {
if(progress > 10) {
$('#progressIcon').attr('src', '/image/timer/flag_blue.png')
} else if (progress > 0) {
$('#progressIcon').attr('src', '/image/timer/flag_green.png')
} else if (progress > -10) {
$('#progressIcon').attr('src', '/image/timer/flag_yellow.png')
} else {
$('#progressIcon').attr('src', '/image/timer/flag_red.png')
}
}

$(function(){
setUpTimer();
});
Binary file added timer/flag_blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added timer/flag_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added timer/flag_red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added timer/flag_yellow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e0ddec4

Please sign in to comment.