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
# newgit.rb | |
# from Joao Vitor | |
# Creates a new rails application using git | |
# Initializes the git based on the sake task published on | |
# http://gist.github.com/6750 | |
# task 'git:rails:new_app', :needs => [ 'rails:rm_tmp_dirs', 'git:hold_empty_dirs' ] | |
# rails:rm_tmp_dirs | |
["./tmp/pids", "./tmp/sessions", "./tmp/sockets", "./tmp/cache"].each do |f| |
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
# newgit.rb | |
# from Joao Vitor | |
# Creates a new rails application using git | |
# Initializes the git based on the sake task published on | |
# http://gist.github.com/6750 | |
# task 'git:rails:new_app', :needs => [ 'rails:rm_tmp_dirs', 'git:hold_empty_dirs' ] | |
# rails:rm_tmp_dirs | |
["./tmp/pids", "./tmp/sessions", "./tmp/sockets", "./tmp/cache"].each do |f| |
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
# newgit.rb | |
# from Joao Vitor | |
# Creates a new rails application using git | |
# Initializes the git based on the sake task published on | |
# http://gist.github.com/6750 | |
# task 'git:rails:new_app', :needs => [ 'rails:rm_tmp_dirs', 'git:hold_empty_dirs' ] | |
# rails:rm_tmp_dirs | |
["./tmp/pids", "./tmp/sessions", "./tmp/sockets", "./tmp/cache"].each do |f| |
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
require 'rubygems' | |
require 'RMagick' | |
include Magick | |
WIDTH = 50 | |
HEIGHT = 26 | |
STEP = 32 | |
image = Image.read("background.png") | |
data = image[0] |
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
namespace :sphinx do | |
desc 'make symlinks' | |
task :symlink do | |
run <<-CMD | |
if [ ! -d #{shared_path}/sphinx ]; then mkdir -p #{shared_path}/sphinx; fi; | |
rm -fr #{release_path}/db/sphinx && | |
ln -nfs #{shared_path}/sphinx #{release_path}/db/sphinx | |
CMD | |
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
1. Налог должен вычислятся автоматически в зависимости от того, какого типа транзакция | |
2. Должна быть система подтранзакций. | |
3. Создание подтранзакций полностью автоматическое и срабатывает во время сохранения транзакции (after_create) | |
4. Guardian(Защита переключения состояния) работает только у основной транзакции и проверяет сумму у всех транзакций, чтоб небыло проблем с различными состояниями транзакций | |
5. Для любой транзакции верхнего уровня есть метод подсчета всей суммы с налогами и без налогов. | |
6. Реферральские определяются из источника (пользователя от которого уходит платеж) и приемника (пользователя которому уходит платеж) | |
7. В каждой транзакции на момент ее подготовки (забора средств со счета) запоминается баланс всех сторон (нужно для поиска багов) | |
а) Типы транзакций: | |
1. Перевод денег системой MONEY_TACTION |
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
// Custom transition for Scriptaculous | |
Effect.Transitions.easeInBack = function(pos) { | |
var x = 1.618; | |
return Math.pow(pos, 2) * ((x + 1) * pos - x); | |
}; | |
var WebcallPlugin = { | |
actionInProcess : false, | |
validateResult : false, |
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
<script> | |
document.observe('dom:loaded', function() { | |
WebcallPlugin.initialize({ | |
actionButton : $$('#webcall-wrapper a.form-submit')[0], | |
frameContainer : $$('#webcall-wrapper ul')[0], | |
frameWidth : $$('#webcall-wrapper ul li')[0].getWidth(), | |
haveMoney : <%=@current_user.webcall_allowed?%>, | |
captions : { | |
phone : 'phone number', | |
sip : 'SIP Address', |
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
// Custom transition for Scriptaculous | |
Effect.Transitions.easeInBack = function(pos) { | |
var x = 1.618; | |
return Math.pow(pos, 2) * ((x + 1) * pos - x); | |
}; | |
var WebcallPlugin = { | |
actionInProcess : false, | |
validateResult : false, | |
interval : null, |
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
// Custom transition for Scriptaculous | |
Effect.Transitions.easeInBack = function(pos) { | |
var x = 1.618; | |
return Math.pow(pos, 2) * ((x + 1) * pos - x); | |
}; | |
var WebcallPlugin = { | |
actionInProcess : false, | |
validateResult : false, | |
interval : null, |
OlderNewer