This file contains 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
a |
This file contains 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
function ObjectFactory () { | |
this.build = { | |
chocolate: function () { | |
console.log('built a chocolate factory'); | |
}, | |
fudge: function () { | |
console.log('built a fudge factory'); | |
} | |
} | |
} |
This file contains 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
class Order | |
attr_accessor :size, :value | |
def initialize size, value | |
@size = size | |
@value = value | |
end | |
end |
This file contains 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
# This is a comment | |
FROM ubuntu:14.04 | |
MAINTAINER Greg Stewart <gregs@tcias.co.uk> | |
RUN apt-get update && apt-get install -y curl --assume-yes | |
RUN \curl -sSL https://get.rvm.io | bash | |
RUN echo 'source /etc/profile.d/rvm.sh' >> ~/.bashrc | |
RUN /usr/local/rvm/bin/rvm-shell -c "rvm requirements" | |
# install Ruby | |
RUN /usr/local/rvm/bin/rvm-shell -c "rvm autolibs enable" | |
RUN /usr/local/rvm/bin/rvm-shell -c "rvm install 2.1.4" |
This file contains 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
_.uniq(array.filter(function (fn) { return fn === element; })) |
This file contains 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
_.uniq(array.map(function (f) { return f.toString(); }), element.toString()) |
This file contains 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
(function (module) { | |
'use strict'; | |
var config = { | |
plato: { | |
options : { | |
exclude: /assets\/.+/ | |
}, | |
files: { | |
'reports/plato': ['src/**/*.js', 'test/**/*.js'] |
This file contains 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
# store credentials | |
git config credential.helper store | |
# unset storing of credentials | |
git config --unset credential.helper |
This file contains 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
describe("our use of global namespace", function () { | |
var in_array = function (value, array) { | |
return ($.inArray(value, array) !== -1); | |
}; | |
var global_namespace_provenance = function (thing) { | |
var previous_global_things = _global_namespace_things; | |
if (in_array(thing, previous_global_things)) { | |
return "existed in global before: " + thing; |
NewerOlder