Skip to content

Instantly share code, notes, and snippets.

[{"id":2,"sender":"900","kind":"deposit","regexp":"(?-mix:^(?\u003ccard_last_4\u003e\\d{4}) (?\u003ctime\u003e\\d\\d:\\d\\d)(?:[\\wА-я]{3})? Перевод (?\u003cdeposit_amount\u003e\\d+[\\.,\\s\\u00a0]\\d+|\\d+)р от (?\u003cfrom_name\u003e.+))","example_text":null,"enabled":true,"created_at":"2025-04-30T18:59:57.987+03:00","updated_at":"2025-04-30T18:59:57.987+03:00"},{"id":3,"sender":"900","kind":"deposit","regexp":"(?-mix:(?\u003ccard_brand\u003eVisa Classic|MasterCard Mass|MasterCard|ECMC|VISA|MC|MIR|МИР)(?:\\-)?(?\u003ccard_last_4\u003e\\d{4}) (?\u003cdate\u003e\\d\\d\\.\\d\\d\\.\\d\\d)?(?:\\s)?(?\u003ctime\u003e\\d\\d:\\d\\d)?(?:[\\wА-я]{3})?(?:\\s)?(зачисление|Перевод|зачислен перевод) (?\u003cdeposit_amount\u003e\\d+[\\.,\\s\\u00a0]\\d+|\\d+)р(?:\\s)?(от (?\u003cfrom_name\u003e.+) Баланс: ((\\-)?\\d+[\\.,\\s\\u00a0]\\d+|\\d+)р?)?)","example_text":null,"enabled":true,"created_at":"2025-04-30T18:59:57.992+03:00","updated_at":"2025-04-30T18:59:57.992+03:00"},{"id":721,"sender":"MTC","kind":"deposit","regexp":
[
{"Exchange Pair":"usdt_trc20_usdt_trc20","Detail Type":"Order","Amount":-6.675967,"Balance":15178.125088,"Created At":"2025-03-27T02:47:46.149828","Exchange Rate":1.00,"Updated At":"2025-03-27T02:47:46.149828","Account ID":14893,"Partner ID":14894,"ID":619772775,"Detail ID":71430072,"Metadata":"{}","Code":"freeze_deposit_for_order","Synced":true},
{"Exchange Pair":"usdt_trc20_usdt_trc20","Detail Type":"Order","Amount":6.675967,"Balance":188.228616,"Created At":"2025-03-27T02:47:46.157987","Exchange Rate":1.00,"Updated At":"2025-03-27T02:47:46.157987","Account ID":14894,"Partner ID":14893,"ID":619772776,"Detail ID":71430072,"Metadata":"{}","Code":"freeze_deposit_for_order","Synced":true},
{"Exchange Pair":"usdt_trc20_usdt_trc20","Detail Type":"Order","Amount":-10.789772,"Balance":1298.967717,"Created At":"2025-03-27T02:47:53.0514","Exchange Rate":1.00,"Updated At":"2025-03-27T02:47:53.0514","Account ID":42350,"Partner ID":42351,"ID":619772781,"Detail ID":71430075,"Metadata":"{}","Code":"freeze_deposit_for_or
@RainbowPonny
RainbowPonny / rails-jsonb-queries
Created October 21, 2022 09:17 — forked from mankind/rails-jsonb-queries
Ruby on Rails-5 postgresql-9.6 jsonb queries
http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query
http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails
#payload: [{"kind"=>"person"}]
Segment.where("payload @> ?", [{kind: "person"}].to_json)
#data: {"interest"=>["music", "movies", "programming"]}
Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json)
Segment.where("data #>> '{interest, 1}' = 'movies' ")
Segment.where("jsonb_array_length(data->'interest') > 1")
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC38OXemZPiI57wZNIbsSX3+j5dwhRC15Sit9ekBUi6KwLsqkhAK7kFF4L5Lie0eTTh+4jK402tPlRdCREf2WM8s5Z5W4r+SW/pdkVz4O/6h0wjqqToYYuS3VsEZdJZhRiIBn2AQlXVWGu9z+rR2OfqU2i398M2mcXjtTOFXGQhEV2lpN/zGTS+FWpu3CpEij9qzI6tocwZKapEXWd2ZeifcpKvsJV02Q+iS0KaJfdhjQFX4OkMEo3cIUOhMp8I9DgtjcrQs1wQ1nVl3dUuLvmtz3Yym+YRUDqDkU8e4tFIjfpE03GD0dxyivJyekDxvsurXwb1sYzooIrQbU7uSHlH anton@anton-B450-AORUS-PRO
@RainbowPonny
RainbowPonny / line_count_benchmark.rb
Created September 16, 2020 09:35 — forked from guilhermesimoes/line_count_benchmark.rb
Ruby Benchmark: Counting the number of lines of a file
# gem install benchmark-ips
require "benchmark/ips"
path = "lib/rubycritic/cli/options.rb"
Benchmark.ips do |x|
x.report("read + each_line") { File.read(path).each_line.count }
x.report("open + each_line") { File.open(path, "r").each_line.count }
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@RainbowPonny
RainbowPonny / gist:0995a941da819b507edfb4ec42213e84
Last active August 27, 2020 11:23 — forked from bbonamin/gist:96be60bad7fa5164a092
SSL in Development with Nginx + Rails
  1. Install nginx brew install nginx
  2. Cd into the nginx directory /usr/local/etc/nginx
  3. Create a ssl directory, change and generate a dummy ssl cert: mkdir ssl cd ssl openssl req -new -newkey rsa:2048 -sha1 -days 365 -nodes -x509 -keyout server.key -out server.crt (just accept the default empty settings)
  4. Go back to the nginx directory cd ..
  5. Create or edit nginx.conf with the following settings:
events {