SOFTWARE ARCHITECTURE with emphasys on Management
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
#!/usr/bin/env ruby | |
class Symbol | |
def with(*args, &block) | |
->(caller, *rest) { caller.send(self, *rest, *args, &block) } | |
end | |
end | |
require 'active_support/core_ext/string' | |
require 'colorize' |
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
inherit_from: | |
- .rubocop_todo.yml | |
AllCops: | |
DisplayCopNames: true | |
DisplayStyleGuide: true | |
ExtraDetails: true | |
EnabledByDefault: true | |
UseCache: true | |
CacheRootDirectory: ~ |
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
#... | |
n = Time.now | |
if n.friday? || n.saturday? || n.sunday? | |
Minitest::Test.class_eval do | |
def result_code | |
failure && failure.result_code || '👍 ' | |
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
#!/usr/bin/ruby | |
require 'irb/completion' | |
require 'irb/ext/save-history' | |
require 'rubygems' | |
IRB.conf[:SAVE_HISTORY] = 1000 | |
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb_history" | |
IRB.conf[:PROMPT_MODE] = :SIMPLE |
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 ActiveRecordError < StandardError | |
class RecordInvalid | |
class SubclassNotFound | |
class SerializationTypeMismatch | |
class AdapterNotSpecified | |
class AdapterNotFound | |
class ConnectionNotEstablished | |
class RecordNotFound | |
class RecordNotSaved | |
class RecordNotDestroyed |
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
# app/nfe/base.rb | |
module Nfe | |
class Base | |
def self.array(array) | |
array.map { |hash| new(hash) } | |
end | |
def initialize(hash) | |
@hash = hash.stringify_keys |
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
# ruby abc.rb | |
require 'minitest' | |
require 'minitest/autorun' | |
class Abc | |
def a | |
return 'aaa' | |
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
timezone: | |
- info | |
source for TZInfo is 'cat /usr/share/zoneinfo/zone.tab' | |
rails uses this as standard ::ActiveSupport::TimeZone.all | |
rake time:zones:all | |
- test: | |
raises an error | |
Time.zone='Fuck' |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hello</title> | |
</head> | |
<body> | |