Skip to content

Instantly share code, notes, and snippets.

View 0x000def42's full-sized avatar

Dmitriy 0x000def42

  • Malaysia
  • 17:08 (UTC +07:00)
View GitHub Profile
@0x000def42
0x000def42 / tp.rb
Last active May 20, 2025 18:45
Auto yard documentation
# frozen_string_literal: true
require "set"
PROJECT_ROOT = Dir.pwd
OVERWRITE = true # перезаписывать блок при каждом запуске
MAKE_BACKUP = false # писать .bak
MAX_SAMPLES = 10
# ───────── helpers
def project_file?(path)
# Add somewhere inside you spec file
require 'ruby_parser'
RSpec.configure do |config|
config.after(:suite) do
# Calling compare_traces after all suites complete
compare_traces('trace_with_feature_on.txt', 'trace_with_feature_off.txt')
end
end
# frozen_string_literal: true
# == Examples of usage
# class A
# include WithRetry
#
# def process
# with_retry(catch_only_on_expections: [StandardError]) do
# # do something
# end
call plug#begin('~/.vim/plugged')
Plug 'xolox/vim-misc'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
"Plug 'jiangmiao/auto-pairs'
Plug 'tpope/vim-fugitive' "git differences, other git intergations"
Plug 'airblade/vim-gitgutter' "deleteon and insertion marks"
Plug 'kien/ctrlp.vim'
Plug 'morhetz/gruvbox'
Plug 'easymotion/vim-easymotion'
ActiveRecord::Base.connection.execute('select \'drop table "\' || tablename || \'" cascade;\' from pg_tables where schemaname = \'public\'').to_a.map{|e| e.values[0]}.each {|stmt| ActiveRecord::Base.connection.execute(stmt)}