Skip to content

Instantly share code, notes, and snippets.


Filip Bartuzi Bartuz

View GitHub Profile
Bartuz / validate_with_matcher.rb
Last active Nov 24, 2020 — forked from otaviomedeiros/validate_with_matcher.rb
RSpec matcher for validates_with
View validate_with_matcher.rb
# RSpec matcher for validates_with.
# Usage:
# describe User do
# it { should validate_with CustomValidator }
# end
RSpec::Matchers.define :validate_with do |expected_validator, options|
match do |subject|
@validator = subject.class.validators.find do |validator|
Bartuz / resume.json
Last active Oct 5, 2020
View resume.json
"$schema": "",
"meta": { "theme": "flat" },
"basics": {
"name": "Filip Bartuzi",
"label": "Senior Software Engineer",
"image": "",
"email": "",
"phone": "+48664446594",
"url": "",
Bartuz / component.jsx
Last active Jul 7, 2020
helper to test How to unit test Reaptcha invisible recaptcha google jest enzyme
View component.jsx
const Component = ({ onSuccess, onError, onExpire }) => {
const recapchaRef = useRef(null);
return (
onRender={() => recapchaRef.current.execute()}
View nested_attributes_for_strategy.rb
class NestedAttributesForStrategy
def association(runner)
def result(evaluation)
evaluation.object.tap do |instance|
evaluation.notify(:after_build, instance)
return attributes(instance)
View test.rb
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
gemfile(true) do
source ""
# Activate the gem you are reporting the issue against.
Bartuz / .Title
Created Jun 2, 2017 — forked from congjf/.Title
Using MongoDB in golang with mgo
View .Title
Using MongoDB in golang with mgo
View gist:122b8992ee714eb872e013bd847b6de0
1. Usuniesz klucz z web appki phraseappa
2. $ yarn phraseapp:push
3. Klucz pojawia sie ponownie we phareappie
Jeśli <— Prawdiłowe flow
1. Usuniesz klucz z phraseappa
2. $ yarn phraseapp:pull
3. $ yarn phraseapp:push
4. klucz znika z plików .json i z web appki phraseappa
View service.rb
def initialize(options = {})
@type = options.fetch(:destination_type) { CARD_TO_CARD }
@options = options
def initialize(destination_type: CARD_TO_CARD, **options)
@type = destination_type
@options = options

Keybase proof

I hereby claim:

  • I am bartuz on github.
  • I am fbartuzi ( on keybase.
  • I have a public key whose fingerprint is 3434 16BB 7526 A36F 7B75 0DF1 22A4 EBE5 92DE FB89

To claim this, I am signing this object:

View rspec_model_testing_template.rb
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
# @kyletcarlson
# This skeleton also assumes you're using the following gems: