Skip to content

Instantly share code, notes, and snippets.

View ilyacherevkov's full-sized avatar

Ilya Cherevkov ilyacherevkov

  • Moscow, Russian Federation
View GitHub Profile

Deploy Rails app to digitalocean with nginx, unicorn, capistrano & postgres

Create droplet of your liking (ubuntu 12.10 x32)

ssh to root in terminal with your server ip

ssh root@123.123.123.123

Add ssh fingerprint and enter password provided in email

=semantic_form_for [:admin, @dog], validate: true, html: {multipart: true} do |f|
=f.inputs do
=f.input :name
=f.input :kennel_name
=f.input :birthdate
=f.input :gender, as: :radio, collection: {'Tik' => 'F', 'Hane' => 'M'}
=f.input :father_id, as: :select, collection: @dogs
=f.input :mother_id, as: :select, collection: @bitches
=f.semantic_fields_for :pictures do |pic|
require 'json'
require 'openssl'
require 'date'
require 'rest-client'
module Nt
class Client
BASE_URI = "https://beta.tradernet.ru/api/"
TIMEOUT = 1
require 'openssl'
require 'time'
require 'json'
require 'socket.io-client-simple'
require 'eventmachine'
api_key = "xxx"
secret_key = "yyy"
EM.run {
import axolotl_curve25519 as curve
import os
import base58
import hashlib
import sha3
import pyblake2
import random
import re
from multiprocessing import Process, Value, Lock
from time import sleep
@ilyacherevkov
ilyacherevkov / escape_character.rb
Created March 25, 2019 09:28
escape character
names = ["\"Петр Сергеевич\"", "\"Курсатов Роман\"", "\"Валерий А\"", "\"Тарас\"", "\"влад иванов\"", "\"Курсатов Роман\"", "\"Vadim\"", "\"sergey voronin\"", "\" \"", "\" \"", "\"Курсатов Роман\"", "\"Валерий\"", "\"Курсатов Роман\"", "\"Курников Руслан Сергеевич / ОО\"", "\"Илья иванович\"", "\" \"", "\"Павел2 Олегович\"", "\"Илья иванович\"", "\" \""]
names.map { |i| i.gsub(/"/, '') }
names.map { |i| i.gsub("\"", "") }
names.map { |i| i.gsub(/"/, '') }

Keybase proof

I hereby claim:

  • I am ilyacherevkov on github.
  • I am ilyacherevkov (https://keybase.io/ilyacherevkov) on keybase.
  • I have a public key ASAW9xqPbOqIdLI7ogIKssm3OIu_haj8Ao97nc7Jc1RhOgo

To claim this, I am signing this object: