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
function pick(obj, ...keys) { | |
if (typeof obj !== 'object') return; | |
var result = {}; | |
for (var key of Object.keys(obj)) { | |
if (keys.indexOf(key) >= 0) result[key] = obj[key]; | |
} | |
return result; | |
} |
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
> [email protected] test /Users/chris/Code/fomo-server | |
> PORT=9999 NODE_ENV=testing _mocha ./test/bootstrap.test.js ./test/unit/*.test.js ./test/unit/**/*.test.js -r should --timeout 60000 | |
[2J[0f[33mwarn: [39mSails' built-in layout support only works with the `ejs`, `handlebars`, `ractive` view engines. | |
[33mwarn: [39mYou're using `jade`. | |
[33mwarn: [39mIgnoring `sails.config.views.layout`... | |
Connecting Mongoose to mongodb://localhost:27017/fomo |
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
ruby '2.0.0' | |
source 'https://rubygems.org' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '4.2.4' | |
# Use PostegreSQL | |
gem 'pg' | |
# Use Slim for templates | |
gem 'slim-rails' | |
# We need SASS support for some jQuery plugins |
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
* guard-rspec (4.6.4) | |
* rspec (3.3.0) | |
* rspec-core (3.3.2) | |
* rspec-expectations (3.3.1) | |
* rspec-mocks (3.3.2) | |
* rspec-rails (3.3.3) | |
* rspec-support (3.3.0) |
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
require 'rails_helper' | |
feature 'Managing users' do | |
given(:user) { create(:user) } | |
given(:admin) { create(:admin_user) } | |
context 'as an Admin' do | |
background do | |
login_as admin | |
user # reference user to ensure it exists |
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
> [email protected] start /Users/chris/Work/Aditive/aditive-backend | |
> nodemon app.js | |
[nodemon] 1.8.1 | |
[nodemon] to restart at any time, enter `rs` | |
[nodemon] watching: *.* | |
[nodemon] starting `node app.js` | |
warn: Sails' built-in layout support only works with the `ejs`, `handlebars`, `ractive` view engines. | |
warn: You're using `jade`. | |
warn: Ignoring `sails.config.views.layout`... |
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
## | |
# Host Database | |
# | |
# localhost is used to configure the loopback interface | |
# when the system is booting. Do not change this entry. | |
## | |
127.0.0.1 localhost | |
255.255.255.255 broadcasthost | |
::1 localhost | |
127.0.0.1 test.localhost |
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
# LinkedList implementation as given in the problem assignment | |
class LinkedList | |
attr_accessor :payload, :next_element | |
def initialize(payload, next_element) | |
@payload, @next_element = payload, next_element | |
end | |
end | |
# output_list implementation as given in the problem assignment |
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
;;--------------;; | |
;; Exercise 1.1 ;; | |
;;--------------;; | |
10 | |
;=> 10 | |
(+ 5 3 4) | |
;=> 12 | |
(- 9 1) | |
;=> 8 | |
(/ 6 2) |
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
defmodule Johnann do | |
def john(n) when n >= 1 do | |
john_and_ann(n)[:john] | |
end | |
def ann(n) when n >= 1 do | |
john_and_ann(n)[:ann] | |
end | |