Skip to content

Instantly share code, notes, and snippets.

Alexander cutalion

Block or report user

Report or block cutalion

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:4b2860f3ab0f03d9ce92c09efb6ee7ad
# Пусть админы могут удалять комментарии
# и мы уведомляем кого-нибудь, что комментарий был удален
class DeleteComment
def call(comment)
transaction do
cutalion / Gemfile
Last active Mar 5, 2018
ROM sql-memory combine
View Gemfile
source ""
gem 'sqlite3'
gem 'dry-logic'
gem 'dry-types'
gem 'rom'
gem 'rom-sql'
gem 'pry'

Keybase proof

I hereby claim:

  • I am cutalion on github.
  • I am cutalion ( on keybase.
  • I have a public key ASA_TnJvySK6SN95G7RdeuuJi2XAcunV37SabTXa2IwBcAo

To claim this, I am signing this object:

View test.rb
require 'rom'
require 'rom-repository'
require 'rom-sql'
require 'pry'
module Entity
config =, 'sqlite::memory')
conn = config.gateways[:default].connection
cutalion / Gemfile
Last active Sep 14, 2017
ROM issue with polymorphic association and aggregation
View Gemfile
source ""
gem 'sqlite3'
gem 'dry-logic', github: 'dry-rb/dry-logic', branch: 'master'
gem 'dry-types', github: 'dry-rb/dry-types', branch: 'master'
gem 'rom', github: 'rom-rb/rom', branch: 'master'
gem 'rom-sql', github: 'rom-rb/rom-sql', branch: 'master'
gem 'pry'
View main.go
package main
import (
_ ""
View curry.rb
class SuperCurry
def call(a, b)
puts "#{a} + #{b} = #{a + b}"
def curry(*args)
arity = method(:call).arity
curried_args = args
if curried_args.size == arity
View thread.rb
@start = false
t1 = do
while !@start
sleep 0.001
puts 'started 1'
View monty_hall.rb
N = 10_000
matched1 = 0
matched2 = 0
N.times do
seq = [1, 0, 0].shuffle
guess = rand(3)
matched1 += 1 if seq[guess].eql?(1)
cutalion / .rspec
Last active Apr 7, 2016
Arduino formatter for rspec
View .rspec
--require spec_helper
--format Fuubar
--format ArduinoFormatter
You can’t perform that action at this time.