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
This |
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
set nocompatible | |
filetype off | |
if has("autocmd") | |
filetype indent plugin on | |
endif | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#rc() | |
set tags+=gems.tags |
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( window ) { | |
"use strict"; | |
var document = window.document, | |
fieldValueMap = { | |
"title" : "Ms." | |
, "name" : "JonSnow" | |
, "fullname" : "Jon Snow" | |
, "firstname" : "Jon" | |
, "lastname" : "Snow" | |
, "email" : "[email protected]" |
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
set nocompatible | |
filetype off | |
if has("autocmd") | |
filetype indent plugin on | |
endif | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#rc() | |
set tags+=gems.tags |
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
#! setw -g mode-keys vi */ | |
set -sg escape-time 0 | |
setw -g aggressive-resize on | |
#! bind -n M-h select-pane -L */ | |
#! bind -n M-j select-pane -D */ |
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
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
# You need to install tpm plugins (prefix + I) | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-continuum' | |
# https://github.com/tmux-plugins/tmux-resurrect/blob/master/docs/restoring_programs.md | |
set -g @resurrect-processes '"~guard" "~rails c" "~rails s" "~weechat"' |
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
set nocompatible | |
filetype off | |
if has("autocmd") | |
filetype indent plugin on | |
endif | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#rc() | |
set tags+=gems.tags |
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
module GoogleDriveAccess | |
def new_client | |
Signet::OAuth2::Client.new( | |
client_id: ENV["CLIENT_ID"], | |
:temporary_credential_uri => | |
'https://www.google.com/accounts/OAuthGetRequestToken', | |
:authorization_uri => | |
'https://www.google.com/accounts/OAuthAuthorizeToken', | |
:token_credential_uri => | |
'https://www.google.com/accounts/OAuthGetAccessToken', |
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
class Industry < ActiveRecord::Base | |
belongs_to :Industrious, polymorphic: true | |
end | |
class Donut < ActiveRecord::Base | |
has_one :industry, as: :industrious | |
end | |
class Batman < ActiveRecord::Base | |
has_one :industry, as: :industrious |
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
First off this game is huge. I'm impressed. Most of your code looks to be pretty solid, and your tests are clearly advanced for this stage (we cover testing more extensively later on in the course). | |
I'm going to concentrate on the area that I see the biggest opportunity for improvement. That is going to be in your modules. First thing I noticed was that you are using `@@global` variables. These are generally frowned on because they can have unexpected side effects. More than that though your structure ends up repeating itself a lot. Many of the methods end up with just one line of difference: | |
```ruby | |
break if new_location[0] < Neighborhood.top_left_limit[0] | |
break if new_location[0] > Neighborhood.bottom_right_limit[0] | |
``` |