This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove completed and skipped items. | |
// REFACTOR: Consider doing this in the visual. | |
// Different visuals may want to use these items. | |
var removedCompletedItems = 0, | |
removedSkippedItems = 0; | |
_.values(MemoryBank.items).forEach(function (item) { | |
if (item.memories.completed) { | |
delete MemoryBank.items[item.id]; | |
removedCompletedItems += 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var items = MemoryBank.items, | |
removedItems; | |
removedItems = _.countBy(items, function (item) { | |
if (item.memories.completed) { | |
return "completed"; | |
} else if (item.memories.skipped) { | |
return "skipped"; | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var removedItems = { completed: 0, skipped: 0 }; | |
_.each(MemoryBank.items, function (item) { | |
if (item.memories.completed) { | |
removedItems.completed++; | |
delete MemoryBank.items[item.id]; | |
} | |
if (item.memories.skipped) { | |
removedItems.skipped++; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<svg class="plot" width="900" height="315"> | |
<g class="nodes"> | |
<g data-id="194647" data-skipped="" class="node hidden"><circle class="node-circle"></circle><path class="active" d="m0,-5l0,10m -5,-5l10,0" pointer-events="none"></path></g> | |
<g data-id="298417" data-skipped="" class="node hidden"><circle class="node-circle"></circle><path class="active" d="m0,-5l0,10m -5,-5l10,0" pointer-events="none"></path></g> | |
<g data-id="2971678" class="node" transform="translate(397,283)"><circle class="node-circle" r="6"></circle><path class="active" d="m0,-5l0,10m -5,-5l10,0" pointer-events="none"></path></g> | |
<g data-id="438695" class="node" transform="translate(397,283)"><circle class="node-circle" r="6"></circle><path class="active" d="m0,-5l0,10m -5,-5l10,0" pointer-events="none"></path></g> | |
<g data-id="235428" class="node" transform="translate(397,283)"><circle class="node-circle" r="6"></circle><path class="active" d="m0,-5l0,10m -5,-5l10,0" pointer-events="none"></path></g> | |
<g data-id="297167 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"file_exclude_patterns": | |
[ | |
".tags", | |
".git", | |
".gitmodules", | |
".tags_sorted_by_file", | |
".gemtags", | |
"tmp/*", | |
"log/*", | |
".bundle/*", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// JSHint Default Configuration File (as on JSHint website) | |
// See http://jshint.com/docs/ for more details | |
"maxerr" : 50, // {int} Maximum error before stopping | |
// Enforcing | |
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.) | |
"camelcase" : false, // true: Identifiers must be in camelCase | |
"curly" : true, // true: Require {} for every new block or scope |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul class="progress-breakdown"> | |
<li class="stat started"> | |
::before | |
<div class="stat-primary"> | |
number | |
</div> | |
<div class="stat-secondary"> | |
explanation | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="content-primary"> | |
<section class="something study-all"> | |
button | |
</section> | |
<section class="something review-all"> | |
button | |
</section> | |
<section class="something item-stats"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="content-primary"> | |
<section class="column study-all"> | |
button | |
<% if %> | |
count | |
<% else %> | |
don't have any | |
no-items-to-study | |
<% end %> | |
</section> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REFRESH_DELAY = 6000 | |
@HumanTime = React.createClass | |
displayName: "humantime" | |
getInitialState: -> | |
{relativeTime: @humanize(@props.datetime)} | |
componentDidMount: -> | |
@interval = setInterval(@refresh, REFRESH_DELAY) |