...seen cases in production where such queries consume GBs of memory bringing down our servers. The solution Just use .preload instead. Rails will use separate queries to preload the data...

Note that we prefer not using the Rails asset pipeline at all and serving all assets through Webpack for the sake of consistency. Preparations Remove version locks in Gemfile...

Remove version locks in package.json for webpack and webpack-dev-server Install by calling bundle update webpacker and yarn upgrade Update file contents Work through the Webpacker...

...Uses a filename from the response URL if no filename is sent by the server. Does not leave the current page when downloading. Works with both static files and send...

Fails the test if the server doesn't respond with a HTTP 2xx status. Works in CI. Limitations The helper cannot inspect downloads that are triggered or created by...

...which hold time zone information and Time.now only in those that run with the server's time. If you don't, bad things can and will happen. More information can...

...more and more memory and prevent the garbage collector from reclaiming memory. This userRepository service caches users once they were loaded from a remote server and, hence, leaks memory:

docs.ruby-lang.org

...argument that will be the result of that block iteration. The following method will serve as an example in the details below: def example puts yield puts 'done' return 'example...

...the xlog.db file? The file contains metadata about your wal archive on the barman server. It's updated when new WAL data arrives or when barman deletes outdated WAL data...

We use the whenever gem to automatically update the crontab of the servers we deploy to. By default, whenever will update all servers with a matching role (we use the...

...be evaluated when running middleman for the specific environment. Default for the local dev server is development, default for building is production. Activate an environment with -e staging or --environment...

...be "built", too. However, testing in :build mode oddly # takes thrice as long as :server: mode, so you might try and skip this # setting for faster test runs. config[:mode...

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...

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')

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...

...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...

When requests arrive at the application servers simultaneously, weird things can happen. Sometimes, this can also happen if a user double-clicks on a button, for example. This often leads...

...sufficient context is provided. Example Create notification.resolver.ts: Return the state$ property from the notification service: Use an async resolver; Update overview.component.ts: Replace injected notification service: Use @Input() id: number with...

...pattern more frequently than necessary. With experience, it can fully replace manual edits and serve as a solid foundation for correctly specifying requirements and plans in more advanced AI-based...

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...

github.com

...used as a baseline within research to compare approach to each other. This can serve as a ground for further research into this topic within this problem domain. Implementation

DevOps Curriculum

Du weißt, was eine systemd unit ist Du weißt, wie du einen Service konfigurierst Du weißt, wie du units abhängig vom Zeitpunkt und/oder anderen Events im System laufen...

...den gleichen Inhalten verwenden z.b. man systemd.service oder man systemd.timer Wikipedia Tutorialspoint Freedesktop Systemd Service ArchWiki Systemd Timers man loginctl ArchWiki systemd-networkd man file-hierarchy Übungen Erstelle dir eine...

...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...

Just like we use gems on the server, we use third party JavaScript libraries in the browser. These typically provide functionality like: General support libraries like Lodash Frontend Frameworks like...

...Look at The cost of JavaScript (2019, 2023) to figure this out. Understand the service Bundlephobia Try to add lodash to MovieDB Use yarn add lodash, then import it in...

...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...

...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...

DevOps Curriculum

PostgreSQL MVCC How does MVCC work? Write-Ahead Logging (WAL) Log-Shipping Standby Servers PostgreSQL VACUUM Investigating slow PostgreSQL Index Only scans Aufgaben Starte PostgreSQL mit einem Docker Container...

...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