This file contains hidden or 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
ситуации: | |
======= | |
1. | |
билет выписан | |
прямая выписка: | |
price_fare + price_tax | |
авиацентр: | |
price_fare + price_tax + price_blanks + price_consolidator |
This file contains hidden or 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
#local user='%{$fg[magenta]%}%n@%{$fg[magenta]%}%m%{$reset_color%}' | |
local pwd='%{$fg[green]%}%~%{$reset_color%}' | |
local rvm='%{$fg[green]%}$(rvm-prompt i v g)%{$reset_color%}' | |
local return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})' | |
local git_branch='$(git_prompt_status)%{$reset_color%}$(git_prompt_info)%{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="" |
This file contains hidden or 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
call pathogen#runtime_append_all_bundles() | |
" this is handled by vim-update-bundles | |
"call pathogen#helptags() | |
" Bundle: https://github.com/vim-scripts/fugitive.vim.git | |
" Bundle: https://github.com/vim-scripts/rails.vim.git | |
" Bundle: https://github.com/vim-scripts/file-line.git | |
" Bundle: https://github.com/vim-scripts/matchit.zip.git | |
" Bundle: https://github.com/vim-scripts/surround.vim.git | |
" Bundle: https://github.com/vim-scripts/unimpaired.vim.git |
This file contains hidden or 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
set :sync_directories, ["public/assets", "public/galleries"] | |
set :sync_backups, 3 |
This file contains hidden or 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
# encoding: utf-8 | |
require 'spec_helper' | |
# TODO написать rspec_matcher для комиссий, с более внятным выводом причин | |
describe Commission do | |
before do | |
Commission.stub(:skip_interline_validity_check).and_return(true) | |
end |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'active_support/core_ext' | |
require 'rspec' | |
require 'bigdecimal' | |
class BigDecimal | |
def inspect; to_s end | |
end |
This file contains hidden or 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 foo | |
puts "trying!" | |
do_something_exceptional | |
rescue RetriableException | |
retries ||= 5 | |
retries -= 1 | |
raise if retries.zero? | |
retry | |
end |
This file contains hidden or 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
(function () { | |
var r20 = /%20/g, | |
rbracket = /\[\]$/; | |
// Serialize an array of form elements or a set of | |
// key/values into a query string | |
jQuery.paramDotted = function( a, traditional ) { | |
var s = [], | |
add = function( key, value ) { | |
// If value is a function, invoke it and return its value | |
value = jQuery.isFunction( value ) ? value() : value; |
This file contains hidden or 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 DotParams | |
class Middleware | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
reparse_query(env["rack.request.query_hash"]) | |
reparse_query(env["rack.request.form_hash"]) |
This file contains hidden or 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 changenode hash, keys, value | |
endkey = keys.pop | |
keys.reduce(hash) { |hash, key| | |
hash[key].tap {|h| h.is_a?(Hash) or raise("key '#{key}' is not a hash") } | |
}[endkey] = value | |
end | |
describe "changenode" do | |
let(:node) do |