- 2006 Wrangler Unlimited (LJ)
- 4.0L
- 6 speed manual
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 'set' | |
| module Trie | |
| class T9 | |
| attr_reader :root | |
| def initialize | |
| @root = Hash.new | |
| 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
| module Wrapper | |
| def wrap(method_name, options: {}) | |
| proxy = Module.new | |
| proxy.define_method(method_name) do |*args, &block| | |
| options = instance_exec(&options) if options.is_a?(Proc) | |
| target = is_a?(Module) ? "#{self}." : "#{self.class}#" | |
| puts "#{target}#{method_name} is about to be called. `wrap` options #{options}" | |
| super *args, &block | |
| end | |
| self.prepend proxy |
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
| # https://github.com/bkeepers/dotenv | |
| COMPOSE_PROJECT_NAME=my_app | |
| REDIS_URL=redis://redis:6379 | |
| PGHOST=db | |
| PGUSER=postgres | |
| PGPASSWORD=postgres |
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
| RSpec.describe Api::ClientBase do | |
| subject(:api) { described_class.new(config) } | |
| let(:scheme) { 'https' } | |
| let(:host) { Faker::Internet.domain_name } | |
| let(:port) { 3000 } | |
| let(:config) do | |
| { | |
| 'scheme' => scheme, |
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 'csv' | |
| require 'activerecord-import' | |
| module ActsAsCsv | |
| extend ActiveSupport::Concern | |
| class_methods do | |
| def filename | |
| if const_defined? :CSV_FILENAME | |
| self::CSV_FILENAME |
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 ApplicationRecord < ActiveRecord::Base | |
| self.abstract_class = true | |
| def self.human_enum_name(enum_name, enum_value) | |
| I18n.t("activerecord.attributes.#{model_name.i18n_key}.#{enum_name.to_s.pluralize}.#{enum_value}") | |
| end | |
| def self.human_enum_collection(enum_name) | |
| send(enum_name.to_s.pluralize).keys.map do |val| | |
| [human_enum_name(enum_name, val), val] |
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
| package main | |
| import ( | |
| "code.google.com/p/go-tour/tree" | |
| "fmt" | |
| ) | |
| // Walk walks the tree t sending all values | |
| // from the tree to the channel ch. | |
| func Walk(t *tree.Tree, ch chan int) { |
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 Order < ActiveRecord::Base | |
| scope :paid, -> { where(id: Payment.paid.select(:order_id)) } | |
| end | |
| # SELECT "orders".* FROM "orders" WHERE "orders"."id" IN ( | |
| # SELECT "payments"."order_id" | |
| # FROM "payments" | |
| # WHERE "payments"."state" IN ('charged', 'authorized') | |
| # ) |
