- Ruby
- Bundler
- Pry
- Pry-byebug
- awesome_print
- Sidekiq/Resque
- Rspec
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 FileException < Exception | |
| end | |
| # Connection client | |
| class ConnectionClient | |
| CLIENT_URL = 'https://our-system.com/connections'.freeze | |
| attr_reader :conn | |
| def initialize(_options) |
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 attributes_to_str(attrs) | |
| return nil unless attrs.kind_of?(Hash) | |
| attrs.map {|k,v| k + ' = ' + v}.join(',') | |
| end | |
| def build(attrs) | |
| <<-QUERY | |
| UPDATE Customers | |
| SET #{attributes_to_str(attrs)} |
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 quicksort(array) | |
| if array.size < 2 | |
| return array | |
| else | |
| pivot = array[0] | |
| less = array[1..-1].filter {|item| item <= pivot } | |
| greater = array[1..-1].filter {|item| item > pivot} | |
| return quicksort(less) + pivot + quicksort(greater) | |
| end | |
| end |
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
| call plug#begin('~/.vim/plugged') | |
| Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
| Plug 'morhetz/gruvbox' | |
| " Initialize plugin system | |
| call plug#end() | |
| syntax on | |
| colorscheme gruvbox | |
| set background=dark | |
| set number |
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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # All Vagrant configuration is done below. The "2" in Vagrant.configure | |
| # configures the configuration version (we support older styles for | |
| # backwards compatibility). Please don't change it unless you know what | |
| # you're doing. | |
| Vagrant.configure("2") do |config| | |
| config.vm.box = "fnando/hellobits-trusty64" |