Skip to content

Instantly share code, notes, and snippets.

View thvd's full-sized avatar

Theodoor van Donge thvd

View GitHub Profile
@thvd
thvd / .gitignore
Created October 3, 2014 07:55
Salesforce gitignore
.project
.settings/
config/
*.sublime-*
mm.log
desktop.ini
@thvd
thvd / unweighted-average.js
Last active August 29, 2015 13:57
Educator calculate unweighted or weighted average mark
var x = Array.prototype.slice.call(document.querySelectorAll('.datatable > tbody > tr > td:nth-child(4n)'), 0)
.filter(function(elem) {return elem.textContent != ''; })
.map(function(elem) {return parseFloat(elem.textContent); });
var total = x.reduce(function(a, b) {return a+b;})
console.info(total/x.length)
/*!
* jQuery TextChange Plugin
* http://www.zurb.com/playground/jquery-text-change-custom-event
*
* Origin:
* Copyright 2010, ZURB
* Released under the MIT License
*/
(function ($) {