I hereby claim:
- I am wojtha on github.
- I am wojtha (https://keybase.io/wojtha) on keybase.
- I have a public key ASDFVo3o5gk9RM2nqCuwdyrOR3w4ODkzQaJ7U2Wn410ksQo
To claim this, I am signing this object:
| require "uri" | |
| # Appends path parts to URI in a similar way how File.join works. | |
| # I.e. passing "https://example.com/a", "/b", "c", "d/e/" will result in | |
| # <URI::HTTPS https://example.com/a/b/c/d/e> | |
| # while the result of URI.join will be: | |
| # <URI::HTTPS https://example.com/d/e/> | |
| # | |
| # See https://ruby-doc.org/stdlib-2.5.1/libdoc/uri/rdoc/URI.html#method-c-join | |
| # See https://www.honeybadger.io/blog/why-is-uri-join-so-counterintuitive/ |
| """Utility functions""" | |
| from functools import reduce | |
| from operator import getitem | |
| from typing import Any, Mapping, Union | |
| def getdeep(data: Mapping, map_list: Union[list, str], default: Any = None) -> Any: | |
| """Iterate nested dictionary|list and can return default value if key not found |
| *.c diff=cpp | |
| *.h diff=cpp | |
| *.c++ diff=cpp | |
| *.h++ diff=cpp | |
| *.cpp diff=cpp | |
| *.hpp diff=cpp | |
| *.cc diff=cpp | |
| *.hh diff=cpp | |
| *.m diff=objc | |
| *.mm diff=objc |
| # This module collects various background job retry schedule strategies including the helper functions for the rendering | |
| # of the retry table schedule to give better idea in which time frame the jobs are going to be run again. | |
| # | |
| # Inspired by https://github.com/isaacseymour/activejob-retry and | |
| # https://github.com/mperham/sidekiq/wiki/Error-Handling#automatic-job-retry | |
| # | |
| module JobRetry | |
| module_function | |
| # Builtin default Sidekiq retry strategy. |
| #!/usr/bin/env ruby | |
| require 'net/http' | |
| require 'ostruct' | |
| require 'optparse' | |
| module Fakturuj | |
| class Application | |
| # https://github.com/honzajavorek/cs-apis/wiki/Kurzy-devizov%C3%A9ho-trhu-%C4%8CNB | |
| CNB_DENNI_KURZ_TXT = URI('https://www.cnb.cz/cs/financni_trhy/devizovy_trh/kurzy_devizoveho_trhu/denni_kurz.txt').freeze |
| # Class StatusFactory is module factory to generate Status classes | |
| # | |
| # @example Status class definition | |
| # | |
| # class Result | |
| # include StatusFactory.new(:success, :failure, query: true, callbacks: true, factory: true, equality: true) | |
| # end | |
| # | |
| # # is equivalent of: | |
| # |
| #!/usr/bin/env bash | |
| # Based on https://stackoverflow.com/a/33548037 | |
| # Maybe we can add this: https://stackoverflow.com/a/32166469 | |
| echo "*** Local tracking branches with removed remote branches:" | |
| # List files | |
| git branch -vv | grep ': gone]'| grep -v "\*" | awk '{ print $1; }' |
I hereby claim:
To claim this, I am signing this object:
| class ExampleFinder < ApplicationRecordFinder | |
| finder_for ::Example | |
| def list_examples_active_at(time) | |
| active_at(time).all | |
| end | |
| def list_past_examples | |
| where('end_at < ?', Time.current).all |
| # Interactor based on Hanami::Interactor, adapted for Rails/ActiveSupport. | |
| # | |
| # @see https://github.com/hanami/utils/blob/master/lib/hanami/interactor.rb | |
| # | |
| module Interactor | |
| # Result of an operation | |
| # | |
| class Result | |
| # Concrete methods | |
| # |