github.com

...alternative to net/http and shares many concepts with WebMock. You can fake a remote server response like this: stub_request(:get, 'http://host/api').to_return(:body => 'fake body')

OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Here is how to fix that in your application.

...This is only okay-ish for testing something in development. Note that there are services like badssl.com to test against weird SSL behavior. Self-signed certificates Talking to a host...

...more processes than just your tests while your test suite is running: The Rails server booted by each test process (in a separate process) The Chrome browser started by each...

Your IDE Your window environment Background services Fixing flaky tests Running fewer test processes is only a bandaid. Your test suite has issues with uncontrolled timing issues. Reducing...

...APIs versus "asynchronous" APIs? Why does fetch() not simply return the response from the server? Why is asynchronous code such a big issue in JavaScript (as opposed to the code...

You can either implement your own API backend or use the free service at api.random.org. If you chose the the latter, create an account for it and click...

kb.wisc.edu

...possible that the certificate chain is in the wrong order. Make sure that the server certificate is the first. This is also necessary for nginx. It is recommended to pipe...

...modulus the same syntax applies to RSA and ECDSA certificates: openssl pkey -pubout -in server.key | openssl sha1 openssl req -pubkey -noout -in server.csr | openssl sha1 openssl x509 -pubkey -noout -in...

makandracards.com

...SEARCHKICK_CLIENT_TYPE).to_sym ENV['OPENSEARCH_URL'] ||= case Rails.env when 'production' OPENSEARCH_PRODUCTION_SERVER when 'staging' OPENSEARCH_STAGING_SERVER else 'http://opensearch:9200' # docker container name end

...setup the opensearch cluster. When the cluster exists, open a console on the staging server with the ENV-variable SEARCHKICK_CLIENT_TYPE set to "opensearch". SEARCHKICK_CLIENT_TYPE=opensearch b...

makandra dev
github.com

...img tag in favor of lazy-loading, make sure you have a strategy to serve crawlers, if you need to support them. When the lazy-loaded image is inserted into...

...Session Management Ohne (9.4) JSON Web Tokens (10) Federation / Single-Sign on (11) Serverseitige Angriffe (12) Clientseitige Angriffe (13) Clientseitige Schutzmaßnahmen Read through the most known security issues in web...

...HTML code injection Boot up a second Rails application on another port (e.g. rails server -p 4000 to boot it on http://localhost:4000). Assume this is a second domain...

...Warum nicht dem Browser verbieten gefährliche Dinge zu tun, z.B. Inline-Skripte auszuführen? Funktionsweise Server setzt einen HTTP-Header, der detailliert beschreibt, welche (potentiell gefährlichen Dinge) die Webseite tun darf...

...z.B. Analytics-Snippet o.ä.), kann man den nonce-Mechanismus verwenden. Dazu generiert der Server für jeden Request einen zufälligen Wert (eine "Nonce"), und schreibt ihn in Header und an...

...on productivity. Advantages No added effort: tests need to be written anyway. Test heads serve as todo lists. You'll always know what is finished and what is left to...

makandra dev

...this use case, any good network-client gem like the http or httpclient gems serve us just well most of the time. The examples below use the http gem ("http.rb...

...ms, then animate) When you wait for I/O most of the time (web servers, crawlers) Most current and future HTML5 browser APIs have async signatures. Async frontend example

...Rails: How to write custom email interceptors Check if you have a local mail server listening Ensure that e-mail arrives at the inbox without being blocked

...work with other Linux distros, as long as you are using the Xorg display server. It likely won't work on Wayland. The script assumes that external display order is...

Um Server Infrastrukturen schnell und reproduzierbar konfigurieren zu können setzt man auf so genannte Configuration Management Lösungen. Die bekanntesten sind Puppet, Chef, Salstack und Ansible. Dabei hat Ansible den größten...

makandra dev

...or the ENV variable RUBY_YJIT_ENABLE=1 for starting Rails processes on your server...

defined by ActionDispatch::ExceptionWrapper.rescue_responses. In the event of an unexpected internal server error, the exception that caused the error will still be raised within the test so...

...clients, we want to review all code written before it goes to the staging server. Note: This process is tailored to our specific needs and tools at makandra. While it...

makandra dev

...IDENTIFIED BY 'some_password'; GRANT REPLICATION SLAVE ON *.* TO 'replicator'@'%'; Adjust MySQL configuration : Edit /etc/mysql/my.cnf: server-id = 1 log_bin = /var/log/mysql/mysql-bin.log replicate-do-db = some_project_production replicate-do-db...

...other_project_production replicate-ignore-db = mysql server-id needs to be unique among all connected master and slave servers. When replicate-do-db is provided only the chosen databases...

weblog.jamisbuck.org

...passenger worker. Please update the card accordingly if you solve that issue. If your server is running passenger enterprise, rather use that tool to inspect your process.

makandra Curriculum

...and application logos next to the dynamically created images versions of uploaded files. To serve all of those with limited bandwidth and high quality, images formats and compression strategies have...

...Basically a comprehensive Rails Template. Prepares your development environment and lets you select web server, template engine, unit and integration testing frameworks and more. Generate an app in minutes using...

makandra dev
github.com

...the PDF additional assets (CSS, images, Javascripts) are required When using a singlethreaded development server like Thin there is no additional worker process available to deliver those assets.

...set config.allow_concurrency = true (default in Rails 4) Note that this allows concurrent requests served from the same process using threads. This might cause unexpected behavior if your application or...

makandra Curriculum

...Discuss with your mentor Instead of migrations, could we simply log into the production server's SQL console and alter tables there whenever we need a change?