Указываем свое имя и почту
git config --global user.name "Your Name Comes Here"
git config --global user.email [email protected]
Делаем алиасы на команды
| namespace :app do | |
| namespace :error_pages do | |
| desc "Generates static pages 500, 403, 404, 422" | |
| task :generate => :environment do | |
| av = ActionView::Base.new | |
| av.class_eval do | |
| include ApplicationHelper | |
| include Rails.application.routes.url_helpers | |
| end |
| require 'resolv' | |
| class Domain | |
| def mxers(domain) | |
| mxs = Resolv::DNS.open do |dns| | |
| ress = dns.getresources(domain, Resolv::DNS::Resource::IN::MX) | |
| ress.map { |r| [r.exchange.to_s, IPSocket::getaddress(r.exchange.to_s), r.preference] } | |
| end | |
| return mxs |
Указываем свое имя и почту
git config --global user.name "Your Name Comes Here"
git config --global user.email [email protected]
Делаем алиасы на команды
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; Copyright (c) Rich Hickey. All rights reserved. | |
| ; The use and distribution terms for this software are covered by the | |
| ; Common Public License 1.0 (http://opensource.org/licenses/cpl.php) | |
| ; which can be found in the file CPL.TXT at the root of this distribution. | |
| ; By using this software in any fashion, you are agreeing to be bound by | |
| ; the terms of this license. | |
| ; You must not remove this notice, or any other, from this software. | |
| ;dimensions of square world |
| # autoload concerns | |
| module YourApp | |
| class Application < Rails::Application | |
| config.autoload_paths += %W( | |
| #{config.root}/app/controllers/concerns | |
| #{config.root}/app/models/concerns | |
| ) | |
| end | |
| end |
| # -*- coding: utf-8 -*- | |
| class Ticket | |
| # Дложно выполняться условие: | |
| # Пары Edges[0], Edges[2] должны быть уникальны. | |
| Edges = [ [ :new, :open, 'confirm' ], | |
| [ :new, :closed, 'throw_away' ], | |
| [ :open, :assigned, 'assign' ], | |
| [ :assigned, :solved, 'solve' ], | |
| [ :solved, :closed, 'close' ], | |
| [ :solved, :assigned, 'assign' ], |
| module HasRelations | |
| module ClassMethods | |
| def has_relations | |
| include InstanceMethods | |
| has_many :relations, :as => :from | |
| end | |
| end | |
| module InstanceMethods | |
| def related(relation_type = nil) |