Skip to content

Instantly share code, notes, and snippets.

View dbrockman's full-sized avatar

David Brockman dbrockman

View GitHub Profile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@dbrockman
dbrockman / insertAt-removeAt.js
Created March 7, 2013 18:29
JS array insertAt and removeAt function
function insertAt(arr, val, i) {
arr.splice(i, 0, val);
}
function removeAt(arr, i) {
return arr.splice(i, 1).length === 1;
}
function genericInsertAt(arr, val, i) {
Array.prototype.splice.call(arr, i, 0, val);
}