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
// route for / returning fake "Things" objects | |
router.get('/', (req, res, next) => { | |
Things.find() | |
.exec() | |
.then(doc => { | |
if (doc) { | |
res.status(200).json(doc) | |
} else { | |
res.status(404).json({message: '404!'}) | |
} |
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
npm install -g create-react-app | |
/Users/josephleon/.nvm/versions/node/v6.11.0/bin/create-react-app -> /Users/josephleon/.nvm/versions/node/v6.11.0/lib/node_modules/create-react-app/index.js | |
/Users/josephleon/.nvm/versions/node/v6.11.0/lib | |
└─┬ create-react-app@1.5.2 | |
├─┬ chalk@1.1.3 | |
│ ├── ansi-styles@2.2.1 | |
│ ├── escape-string-regexp@1.0.5 | |
│ ├─┬ has-ansi@2.0.0 | |
│ │ └── ansi-regex@2.1.1 | |
│ ├── strip-ansi@3.0.1 |
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
Dependency resolution completed in 61.106 seconds | |
Your requirements could not be resolved to an installable set of packages. | |
Problem 1 | |
- Conclusion: don't install npm-asset/static-module 1.3.1|don't install npm-asset/readable-stream 1.1.12-patch1|install npm-asset/readable-stream 1.0.33-patch2|install npm-asset/readable-stream 1.0.34 | |
- npm-asset/static-module 1.3.2 requires npm-asset/concat-stream ~1.6.0 -> satisfiable by npm-asset/concat-stream[1.6.0, 1.6.1]. | |
- Conclusion: don't install npm-asset/concat-stream 1.6.0 | |
- Conclusion: don't install npm-asset/concat-stream 1.6.1 | |
- Conclusion: don't install npm-asset/static-module 1.4.0 | |
- Conclusion: don't install npm-asset/static-module 1.5.0 |
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 Thing | |
def Love | |
rndm = Random.new | |
end | |
end | |
class It < Thing | |
def love | |
num_of_punches = rndm.rand(1..5) | |
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
class Gear | |
attr_reader :chainring, :cog | |
def initialize(chanring, cog) | |
@chainring = chainring | |
@cog = cog | |
end | |
def ratio | |
chainring / cog.to_f | |
end |