Skip to content

Instantly share code, notes, and snippets.

@IlyaUmanets
IlyaUmanets / authy_service.rb
Created February 8, 2018 09:41
authy_service.rb
# frozen_string_literal: true
class AuthyService
def initialize(customer)
self.customer = customer
end
def register
client.register_user(
email: customer.email,
cellphone: customer.phone_number,
@IlyaUmanets
IlyaUmanets / remove_branches
Last active July 26, 2017 10:35
remove all branches without master
git branch | grep -v -e 'master' | xargs git branch -D
$ pg_dump -U user_name -h localhost database_name -f file_name.sql
# Need a password
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).