Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
- ⌘ : Command key
- ⌃ : Control key
- ⌫ : Delete key
- ← : Left arrow key
- → : Right arrow key
- ↑ : Up arrow key
| // 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', |
| ## 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) |
| # 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" |
| 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 |
| 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 |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
| # To Setup: | |
| # 1) Save the .git-completion.bash file found here: | |
| # https://github.com/git/git/blob/master/contrib/completion/git-completion.bash | |
| # 2) Add the following lines to your .bash_profile, be sure to reload (for example: source ~/.bash_profile) for the changes to take effect: | |
| # Git branch bash completion | |
| if [ -f ~/.git-completion.bash ]; then | |
| . ~/.git-completion.bash | |
| # Add git completion to aliases |
| function loadDev(){ | |
| var jq = document.createElement("script"); | |
| jq.setAttribute("src","http://code.jquery.com/jquery-2.1.0.js") | |
| document.head.appendChild(jq); | |
| var us = document.createElement("script"); | |
| us.setAttribute("src","http://underscorejs.org/underscore.js") | |
| document.head.appendChild(us); | |
| console.log("Loaded Jquery and Underscore") | |
| } | |
| loadDev() |
| require "rubygems" | |
| require "twitter" | |
| require "json" | |
| # things you must configure | |
| TWITTER_USER = "your_username" | |
| MAX_AGE_IN_DAYS = 1 # anything older than this is deleted | |
| # get these from dev.twitter.com | |
| CONSUMER_KEY = "your_consumer_key" |