This file has been truncated, but you can view the full file.
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
| # Logfile created on 2016-10-13 00:51:33 -0300 by logger.rb/47272 | |
| INFO --------------------------------------------------------------------------- | |
| INFO START 2016-10-13 00:51:33 -0300 cap stage deploy | |
| INFO --------------------------------------------------------------------------- | |
| DEBUG [cab7766a] Running [ -d ~/.rvm ] as [email protected] | |
| DEBUG [cab7766a] Command: [ -d ~/.rvm ] | |
| DEBUG [cab7766a] Finished in 3.527 seconds with exit status 0 (successful). | |
| DEBUG [32829e9c] Running ~/.rvm/bin/rvm version as [email protected] | |
| DEBUG [32829e9c] Command: ~/.rvm/bin/rvm version | |
| DEBUG [32829e9c] rvm 1.26.11 (latest) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/] |
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
| # NOTE: only doing this in development as some production environments (Heroku) | |
| # NOTE: are sensitive to local FS writes, and besides -- it's just not proper | |
| # NOTE: to have a dev-mode tool do its thing in production. | |
| if Rails.env.development? | |
| task :set_annotation_options do | |
| # You can override any of these by setting an environment variable of the | |
| # same name. | |
| Annotate.set_defaults({ | |
| 'position_in_routes' => "after", | |
| 'position_in_class' => "after", |
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 " be iMproved | |
| " --------------------------------------------------------------------------- | |
| " Plugins | |
| " --------------------------------------------------------------------------- | |
| call plug#begin('~/.vim/plugged') | |
| " Autocomplete | |
| Plug 'Valloric/YouCompleteMe', { 'do': './install.sh --clang-completer' } |
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 Property < ApplicationRecord | |
| # => Relations | |
| belongs_to :customer | |
| has_many :notes, as: :notable | |
| has_many :work_orders | |
| # => Serializer and accessors | |
| serialize :general_informations, HashSerializer | |
| store_accessor :general_informations, :has_dogs, :gate_code |
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
| def scheduled_at_in_words | |
| time = object.scheduled_at | |
| st = Time.now.beginning_of_day | |
| nd = Time.now.end_of_day | |
| case | |
| when time.between?(st + 1.day, nd + 1.day) | |
| "Tomorrow #{time.strftime('%H:%M')}" | |
| when time.between?(st, nd) | |
| "Today #{time.strftime('%H:%M')}" | |
| when time.between?(st - 1.day, nd - 1.day) |
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
| require 'active_record/connection_adapters/postgresql_adapter' | |
| module ActiveRecord | |
| module ConnectionAdapters | |
| class PostgreSQLAdapter < AbstractAdapter | |
| def drop_database(name) | |
| raise "Nah, I won't drop the production database" if Rails.env.production? | |
| execute <<-SQL | |
| UPDATE pg_catalog.pg_database | |
| SET datallowconn=false WHERE datname='#{name}' | |
| SQL |
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
| " ---------------------- USABILITY CONFIGURATION ---------------------- | |
| " Basic and pretty much needed settings to provide a solid base for | |
| " source code editting | |
| " don't make vim compatible with vi | |
| set nocompatible | |
| " turn on syntax highlighting | |
| syntax on | |
| " and show line numbers |
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
| # local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)" | |
| # %{$fg_bold[green]%}%c %{$reset_color%}$(work_in_progress)%{$fg_bold[blue]%} % %{$reset_color%} | |
| PROMPT=' | |
| %{$fg[blue]%}%c%{$reset_color%} $(git_prompt_info)%{$fg_bold[blue]%} %{$reset_color%} | |
| > ' | |
| RPROMPT='${_current_dir}' | |
| ZSH_THEME_GIT_PROMPT_PREFIX="on %{$fg_bold[white]%}" | |
| ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
| ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}! %{$reset_color%}" |
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
| # Advanced Aliases. | |
| # Use with caution | |
| # | |
| # Open Sublime text | |
| alias ss="subl ." | |
| # Custom | |
| alias workspace='cd ~/workspace' |