Skip to content

Instantly share code, notes, and snippets.

View codyyc's full-sized avatar

Cody Carnachan codyyc

View GitHub Profile
Number.prototype.pad = function(size){
if(typeof(size) !== "number"){size = 2;}
var s = String(this);
while (s.length < size) s = "0" + s;
return s;
}
$ ->
papers = [100,101,201,320]
courses = ["COMPSCI","PSYCH","RUSSIAN"]
$('input[name="course_search"]').keyup =>
add_course course for course in courses when course is this.value
add_course = (course) -> alert "#{course}"