Skip to content

Instantly share code, notes, and snippets.

View falonofthetower's full-sized avatar

Peter Karth falonofthetower

  • CompanyCam
  • Sanford, NC
View GitHub Profile
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
(function( window ) {
"use strict";
var document = window.document,
fieldValueMap = {
"title" : "Ms."
, "name" : "JonSnow"
, "fullname" : "Jon Snow"
, "firstname" : "Jon"
, "lastname" : "Snow"
, "email" : "[email protected]"
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
#! 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 */
# 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"'
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
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',
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
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]
```