Skip to content

Instantly share code, notes, and snippets.

View woto's full-sized avatar
😎
nothing interesting here

Руслан Корнев woto

😎
nothing interesting here
View GitHub Profile
@woto
woto / migration.md
Last active October 21, 2019 10:36
rails generate migration

You can create the table and index with the generator without changing the migration file

For a unique index

rails generate model CreateFoos bar:string:uniq

For a non-unique index

rails generate model CreateFoos bar:string:index

@woto
woto / rake.md
Last active October 22, 2019 10:44
rake tasks
{
:duration => 2000.2723450306803,
:allocations => 20,
:cpu_time => 0.20638099999999854,
:idle_time => 2000.0659640306803,
:transaction_id => "054dc3152d419f050463",
:payload => {
:rack_env => {
"CONTENT_LENGTH" => "7",
"CONTENT_TYPE" => "application/protobuf",
{
:duration => 0.21136004943400621,
:allocations => 5,
:cpu_time => 0.09248999999999889,
:idle_time => 0.11887004943400732,
:transaction_id => "054dc3152d419f050463",
:payload => {
:rack_env => {
"CONTENT_LENGTH" => "7",
"CONTENT_TYPE" => "application/protobuf",
@woto
woto / WYSIWYG.md
Created November 28, 2020 20:21 — forked from monolithed/WYSIWYG.md
WYSIWYG редакторы

Модуль должен соответствовать следующим требованиям:

  • Свободная лицензия (в идеале)
  • API
  • Масштабировать текст по количеству символов (в идеале)
  • Быть кроссбраузерным IE9+
  • Сокращать ссылки и подсвечивать ссылки
  • Иметь защиту от XSS
  • Конфигурироваться
  • Поддерживать историю
@woto
woto / tinkoff_cancel.json
Created April 21, 2024 22:28
Tinkoff cancel
{
"TerminalKey": "TinkoffBankTest",
"PaymentId": 2304882,
"Token": "c0ad1dfc4e94ed44715c5ed0e84f8ec439695b9ac219a7a19555a075a3c3ed24",
"IP": "192.168.255.255",
"Amount": 19200,
"Receipt": {
"FfdVersion": "string",
"ClientInfo": {
"Birthdate": "string",
ru:
activemodel:
errors:
models:
payments/tinkoff/cancel:
attributes:
base:
failure: "Ошибка #%{interaction_id} %{details}"
payments/tinkoff/init:
attributes: