- Initialize Git repository
git init
- Create
.gitignore
file and add the following:node_modules/ *.env
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
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
silence_warnings do | |
ActionDispatch::Request::LOCALHOST = (ActionDispatch::Request::LOCALHOST + ['192.168.0.1']).freeze | |
end | |
ActionController::Base.module_eval do | |
def show_detailed_exceptions? | |
request.local? | |
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
# Add all gems in the global gemset to the $LOAD_PATH so they can be used in rails3 console with bundler | |
if defined?(::Bundler) | |
$LOAD_PATH.concat Dir.glob("#{ENV['rvm_path']}/gems/#{ENV['rvm_ruby_string']}@global/gems/*/lib") | |
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
module Mongoid | |
module CounterCache | |
extend ActiveSupport::Concern | |
module ClassMethods | |
# Use Case: | |
# | |
# keep a cached count of embedded collections in the parent collection(s) | |
# | |
# for example, if a Post embeds many Comments, and there have been 2 |
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
module MyProject | |
module Mongoid | |
module Document | |
extend ActiveSupport::Concern | |
included do | |
include ::Mongoid::Document | |
include ::Mongoid::Timestamps | |
include ::Mongoid::DotNotation | |
include ::Mongoid::SearchForObject | |
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
[ | |
["n", "Next unreviewed file", "nextUnreviewedFile()"], | |
["p", "Previous unreviewed file", "prevUnreviewedFile()"], | |
["shift+n", "Next file", "nextFile()"], | |
["shift+p", "Previous file", "prevFile()"], | |
["x", "Mark file as reviewed / unreviewed", "toggleCurrentFileReviewed(); nextUnreviewedFile()"], | |
["j", "Next unreplied comment", "nextUnrepliedDiscussion()"], | |
["k", "Previous unreplied comment", "prevUnrepliedDiscussion()"], | |
["shift+j", "Next comment", "nextDiscussion()"], | |
["shift+k", "Previous comment", "prevDiscussion()"], |
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
#add 'node_modules' to .gitignore file | |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin master |
NewerOlder