title Подача заявки на бесплатный аккаунт БВ
Actor->HomeController: GET /ownership/
HomeController-->Actor: 200 description text
alt Гость
Actor->RequestsController: GET /ownership/requests/new
RequestsController-->Actor: 200, email, fio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Vim <Formula | |
url 'ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2' | |
homepage 'http://www.vim.org/' | |
md5 '5b9510a17074e2b37d8bb38ae09edbf2' | |
version '7.3.135' | |
def patchlevel; 135 end | |
def features; %w(tiny small normal big huge) end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def render(options = {}, local_assigns = {}, &block) #:nodoc: | |
local_assigns ||= {} | |
case options | |
when Hash | |
options = options.reverse_merge(:locals => {}) | |
if options[:layout] | |
_render_with_layout(options, local_assigns, &block) | |
elsif options[:file] | |
template = self.view_paths.find_template(options[:file], template_format) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module OptHelper | |
def opt(name) | |
local_assigns[name.to_sym].presence | |
end | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plan.allow? "Business", :add_photos, :subject => business | |
# если в качестве неймспейса передана не строка и не символ то | |
# неймспейсом берется класс объекта и он же подставляется как subject | |
plan.allow? business, :add_photos | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module OmniAuth | |
class ReturnPathMiddleware | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
if auth_request?(env) && asseptable_referer?(env) | |
save_referer(env) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var abonent = AbonentsCollection.build(user_data); | |
var view = new Map.Abonent(abonent); | |
Madiator.addAbonentView(view); | |
.... | |
.click(function(ev){ | |
Mediator.showOnMap($(ev.target).attr('abonent_id')) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AuthenticationsController < ApplicationController | |
def create | |
service = AuthenticationService | |
response = if current_user.present? | |
service.join( | |
:omniauth_hash => request.env['omniauth'], | |
:user => current_user | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
VPNWORK="192.168.10.1" | |
if [[ $IPREMOTE = $VPNWORK ]]; then | |
/sbin/route add 192.168.166.0/24 192.168.10.1 > /tmp/ppp.log 2>&1 | |
fi |