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 ActionCable::Channel::Streams | |
def worker_pool_stream_handler(broadcasting, user_handler, coder: nil) | |
{ connection: connection, id: @identifier.to_json } | |
end | |
end | |
class ActionCable::SubscriptionAdapter::SubscriberMap | |
def invoke_callback(callback, message) | |
callback[:connection].send(:websocket).transmit( | |
"{\"identifier\": #{callback[:id]},\"message\": #{message}}" |
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
# rubocop disable:all | |
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' |
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
-- show running queries (9.2) | |
SELECT pid, age(query_start, clock_timestamp()), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- kill running query | |
SELECT pg_cancel_backend(procpid); | |
-- kill idle query |
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 _after_commit_hook | |
super unless skip_after_commit_hook | |
@_counter_culture_active = false | |
end | |
def skip_after_commit_hook | |
false | |
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
language: ruby | |
rvm: | |
- 2.2.3 | |
# Если Travis пишет вам слишком часто, то отключаем email уведомления | |
notifications: | |
email: false | |
# Указываем базу данных | |
addons: |
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
# По умолчанию запускаем только необходимых для тестов наблюдателей, | |
# то есть всех, кроме server. | |
# Для запуска всех: bundle exec guard -g default | |
scope groups: ['specs'] | |
group 'specs' do | |
# запускаем тесты и использованием Spring | |
guard :rspec, cmd: "bundle exec spring rspec" do | |
require "guard/rspec/dsl" | |
dsl = Guard::RSpec::Dsl.new(self) |
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
Pusher = fun(Client, Name, Size) -> F = fun(_, _, _, _, 0) -> io:format('done'); (Fun, C, N, I, Size) -> Segment = "../dash-examples/"++N++integer_to_list(I)++".m4s", io:format("Segment: ~s~n", [Segment]), {ok, B} = file:read_file(Segment), de_client:send(C, {binary, B}), timer:sleep(500), Fun(Fun, C, N, I+1, Size - 1) end, InitName = "../dash-examples/"++Name++"init.mp4", io:format("Init file: ~s~n", [InitName]), {ok, I} = file:read_file(InitName), de_client:send(Client, {binary, I}), timer:sleep(1500), F(F, Client, Name, 1, Size) 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
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' | |
gem 'rack', github: "rack/rack" |
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
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' | |
gem 'arel', github: 'rails/arel' |