package main
/* Билеты по Проектированию Высоко нагруженных систем
- В этом конспекте нет автоматической грамматической проверки
- Он написан для личного пользования, исключительно для подготовки к экзамену
| # docker run --rm -it -v $PWD:/app -w /app durosoft/crystal-alpine:latest crystal run basic_experiment.cr | |
| require "./test_data" | |
| require "http/client" | |
| require "time" | |
| started_at = Time.monotonic | |
| WORKER_COUNT = 2000 |
package main
/* Билеты по Проектированию Высоко нагруженных систем
| CHROME_ARGS = { | |
| "allow-running-insecure-content" => nil, | |
| "autoplay-policy" => "user-gesture-required", | |
| "disable-add-to-shelf" => nil, | |
| "disable-background-networking" => nil, | |
| "disable-background-timer-throttling" => nil, | |
| "disable-backgrounding-occluded-windows" => nil, | |
| "disable-breakpad" => nil, | |
| "disable-checker-imaging" => nil, | |
| "disable-client-side-phishing-detection" => nil, |
| # Ruby CircleCI 2.0 configuration file | |
| # | |
| # Check https://circleci.com/docs/2.0/language-ruby/ for more details | |
| # https://circleci.com/docs/2.0/configuration-reference | |
| version: 2 | |
| jobs: | |
| android: | |
| working_directory: ~/project/android | |
| docker: | |
| - image: circleci/android:api-29-node |
$> curl "https://gist.githubusercontent.com/pftg/fa8fe4ca2bb4638fbd19324376487f42/raw/f9056244c416d2f56d6d94290e5ecef5960abf66/rejuvenation.rb" | rubyor
$> ruby rejuvenation.rb
$> yarn install| #!/bin/bash | |
| set -e | |
| set -o pipefail | |
| # Kill all backgorund process started in this script | |
| #trap "kill 0" EXIT | |
| #trap "exit" INT TERM ERR | |
| # run background process | |
| # wait |
| # frozen_string_literal: true | |
| require 'bundler/inline' | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
| # Activate the gem you are reporting the issue against. |
| require 'async/http/faraday' | |
| require 'async/http/response' | |
| require 'async/http/server' | |
| require 'async/http/url_endpoint' | |
| require 'async/reactor' | |
| require 'uri/http' | |
| # Make it the global default: | |
| Faraday.default_adapter = :async_http |
| diff --git a/Gemfile b/Gemfile | |
| index 4983412..454bd32 100644 | |
| --- a/Gemfile | |
| +++ b/Gemfile | |
| @@ -11,6 +11,10 @@ gem 'pg', '>= 0.18', '< 2.0' | |
| gem 'puma', '~> 3.11' | |
| # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker | |
| gem 'webpacker', '>= 4.0.x' | |
| + | |
| +# Turn your Rails app into a Progressive Web App. https://github.com/rossta/serviceworker-rails |
| release: bin/heroku-release | |
| web: bundle exec puma -C config/puma.rb |