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
| diff --git a/db/structure.sql b/db/structure.sql | |
| index adeb38781..38365d642 100644 | |
| --- a/db/structure.sql | |
| +++ b/db/structure.sql | |
| @@ -2,8 +2,8 @@ | |
| -- PostgreSQL database dump | |
| -- | |
| --- Dumped from database version 10.6 | |
| --- Dumped by pg_dump version 10.6 |
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
| INSERT INTO tenant1.schema_migrations (version) VALUES ('20191015145347'); | |
| INSERT INTO tenant1.schema_migrations (version) VALUES ('20191113052524'); | |
| /home/blasta/.rvm/gems/ruby-2.4.6@agiki/gems/rack-mini-profiler-0.10.7/lib/patches/db/pg.rb:90:in `async_exec' | |
| /home/blasta/.rvm/gems/ruby-2.4.6@agiki/gems/rack-mini-profiler-0.10.7/lib/patches/db/pg.rb:90:in `async_exec' | |
| /home/blasta/.rvm/gems/ruby-2.4.6@agiki/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `block in execute' | |
| /home/blasta/.rvm/gems/ruby-2.4.6@agiki/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract_adapter.rb:484:in `block in log' | |
| /home/blasta/.rvm/gems/ruby-2.4.6@agiki/gems/activesupport-4.2.10/lib/active_support/notifications/instrumenter.rb:20:in `instrument' | |
| /home/blasta/.rvm/gems/ruby-2.4.6@agiki/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract_adapter.rb:478:in `log' |
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 frequency(arr) | |
| count_elments = arr.inject(Hash.new(0)) { |total, e| total[e] += 1 ; total }.sort.sort_by { |k,v| -v } | |
| count_elments.map { |el| el[0] } | |
| end | |
| def flatten(arr) | |
| flatten_array ||= [] | |
| arr.each do |el| | |
| if el.is_a? Array |
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
| ## Nginx ### | |
| check process nginx with pidfile /run/nginx.pid | |
| start program = "/usr/sbin/service nginx start" | |
| stop program = "/usr/sbin/service nginx stop" | |
| if cpu > 60% for 2 cycles then alert | |
| if cpu > 80% for 5 cycles then restart | |
| if memory usage > 80% for 5 cycles then restart | |
| if failed host 51.15.121.165 port 80 protocol http | |
| then restart | |
| if 3 restarts within 5 cycles then timeout |
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
| test1 | |
| test2 | |
| test3 |
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
| curl --url localhost:9292/tests/101 -v | |
| * Trying 127.0.0.1... | |
| * TCP_NODELAY set | |
| * Connected to localhost (127.0.0.1) port 9292 (#0) | |
| > GET /tests/101 HTTP/1.1 | |
| > Host: localhost:9292 | |
| > User-Agent: curl/7.58.0 | |
| > Accept: */* | |
| > | |
| < HTTP/1.1 200 OK |
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
| curl --url localhost:9292/tests -v | |
| * Trying 127.0.0.1... | |
| * TCP_NODELAY set | |
| * Connected to localhost (127.0.0.1) port 9292 (#0) | |
| > GET /tests HTTP/1.1 | |
| > Host: localhost:9292 | |
| > User-Agent: curl/7.58.0 | |
| > Accept: */* | |
| > | |
| < HTTP/1.1 201 Created |
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
| curl --url localhost:9292/tests -v | |
| * Trying 127.0.0.1... | |
| * TCP_NODELAY set | |
| * Connected to localhost (127.0.0.1) port 9292 (#0) | |
| > GET /tests HTTP/1.1 | |
| > Host: localhost:9292 | |
| > User-Agent: curl/7.58.0 | |
| > Accept: */* | |
| > | |
| < HTTP/1.1 201 Created |
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
| curl --url localhost:9292/tests -v | |
| * Trying 127.0.0.1... | |
| * TCP_NODELAY set | |
| * Connected to localhost (127.0.0.1) port 9292 (#0) | |
| > GET /tests HTTP/1.1 | |
| > Host: localhost:9292 | |
| > User-Agent: curl/7.58.0 | |
| > Accept: */* | |
| > |
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
| what means hash ? | |
| this mean a paragraph2 | |
| Matz | |
| Linux |
NewerOlder