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
var fs = require('fs'); | |
var csv = require('fast-csv'); | |
var stream = fs.createReadStream('/home/jaywon/Downloads/modified-salary-per-state-per-jobtitle.csv'); | |
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema; | |
var masterList = []; | |
var mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost:27017/job-imports'); | |
//define schema for import data |
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
var OFF = 0, WARN = 1, ERROR = 2; | |
module.exports = exports = { | |
"env": { | |
"es6": true | |
}, | |
"ecmaFeatures": { | |
// env=es6 doesn't include modules, which we are using | |
"modules": true |
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
# echo is like puts for bash (bash is the program running in your terminal) | |
echo "Loading ~/.bash_profile a shell script that runs in every new terminal you open" | |
# $VARIABLE will render before the rest of the command is executed | |
echo "Logged in as $USER at $(hostname)" | |
# Rbenv autocomplete and shims | |
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi | |
# Path for RBENV | |
test -d $HOME/.rbenv/ && PATH="$HOME/.rbenv/bin:$PATH" |
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
## IMPORTANT -> The expectation must come before the invocation, so that it can catch the invocation when it happens | |
# Able to stub an instance's method. Will return whatever is in the block. The instance's method would have to be invoked in the RSpec. | |
@person.stub(:get_relevant_experts) { @collection_of_possibilities } | |
# Expectation of an instance that is available in the testing context to receive a particular method, choose return value | |
expect(@person).to receive(:get_relevant_experts).with("Medical").and_return(@collection_of_possibilities) | |
# Expectation of an instance to receive a method and return a result | |
expect_any_instance_of(Classification).to receive(:valid_matches).and_return(@collection_of_possibilities) |
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
// use this format since .eslintrc is deprecated. | |
// You can logically derive this format. | |
module.exports = { | |
parser: 'babel-eslint', | |
extends: [ | |
'plugin:flowtype/recommended', | |
'plugin:jest/recommended', | |
'plugin:react/recommended', | |
'eslint-config-airbnb', |
OlderNewer