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
stage: | |
before: | |
- apt-get install -y zip unzip | |
- export REDIS_URL=redis://localhost:6379/1 |
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 wait_for_ajax | |
return unless respond_to?(:evaluate_script) | |
wait_until { finished_all_ajax_requests? } | |
end | |
def finished_all_ajax_requests? | |
evaluate_script("!window.jQuery") || evaluate_script("jQuery.active").zero? | |
end | |
def wait_until(max_execution_time_in_seconds = Capybara.default_wait_time) |
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 'rvideo' | |
class Video < MediaFile | |
after_create :process | |
FLV_WIDTH = 400 | |
FLV_HEIGHT = 316 | |
CLIP_SIZE_LIMIT_MEGABYTES = 50 | |
# Paperclip Video |
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
function Wish(wish_div) { | |
this._wish_div = wish_div; | |
this._header = this._wish_div.find("div.header"); | |
this._content = this._wish_div.find("div.content"); | |
this._showItems = this._wish_div.find(".showItem"); | |
this._tools = this._wish_div.find("div.tools"); | |
} | |
with(Wish) { | |
prototype.hide = function() { |
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 FriendsController < ApplicationController | |
def create | |
@friend = find_friend | |
current_user.request_friend(@friend) | |
render :text => "Заявка отправлена" | |
end | |
def requests | |
@friends_requested = current_user.friends_requested | |
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
module Spree | |
class Gateway::NewGateway < Gateway | |
preference :login, :string | |
preference :password, :string | |
preference :signature, :string | |
preference :currency_code, :string | |
def provider_class | |
ActiveMerchant::Billing::New | |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: god | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: God | |
### END INIT INFO |
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
DJ_WORKERS_NUM = 1 | |
DJ_WORKERS_NUM.times do |num| | |
God.watch do |w| | |
script = File.join(RAILS_ROOT, "script/delayed_job -i #{num}") | |
w.name = "dj-#{num}" | |
w.group = 'dj' | |
w.interval = 30.seconds | |
w.start = "#{script} start" |
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
{ | |
"binary_file_patterns": | |
[ | |
"*.jpg", | |
"*.jpeg", | |
"*.png", | |
"*.gif", | |
"*.ttf", | |
"*.tga", | |
"*.dds", |
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
rm -f ~/Sites/**/log/**/*.log | |
rm -f ~/Sites/**/log/*.log |
OlderNewer