makandra Curriculum

Rubber ducking: not just a funny phrase Debugging in Ruby Note Running your server as part of a single combined terminal with the bin/dev command makes Ruby debugging harder...

...To work around this, you should start your web server in a separate terminal as described above. If you are using terminator, bin/term is the easiest way to to achieve...

...delay (5 seconds in the example), the component makes a request to /foo. The server is expected to respond with HTML containing an element with the same [id] (news in...

The component parses the server response (using DOMParser) and extracts the element with the matching [id] attribute. The component replaces the component with the matching element from the...

...if you do not know. How are cookies transferred between your browser and the server? Open the development tools in your browser for this page. Can you find the cookies...

...network tab, can you see how the cookies are transferred to or from the server? Can you log yourself out by manipulating a cookie? Can you log yourself back in...

makandra Curriculum

Work with the stash git stash Learn how to work with a server: git clone git push git fetch git pull Learn to use the tool tig

...with SSH. Otherwise, you would have to send your git credentials to the remote server every time you interact with it. Resources Basic tutorial Proper git config Interactive Git Cheatsheet...

...a very narrow scope Has no separate build process in development. Instead the Rails server directly compiles the asset whenever it renders a javascript_tag, stylesheet_tag or image_tag...

...example project and resources below: What "packs" are How to use the webpack dev server How to add and remove npm packages with yarn How import and export of relative...

makandra Curriculum

...or JS file to your application (e.g. app/assets/application/navbar.sass), you need to restart your development server for it to show up in your browser. This is caused by a limitation of...

...in your application.js. Direct import statements like import 'app/assets/application/navbar.sass' would work without restarting the server. You'll learn the details of esbuild and the frontend build pipelines in a later...

...specific references (such as selectors or URLs). Note that it's OK for the server to send HTML for your JavaScript to consume. It does not need to be JSON...

You can use fetch() to load a server response into a JavaScript variable, without making a page load. This concept is also known as AJAX. Dual-pane layout

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

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

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

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

makandra Curriculum

...to a editor like gedit, this is not possible for remote shells to our servers. Getting accustomed to a CLI editor will pay off in the long term. Terminal shortcuts...

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

...the load of your application. Decide whether cronjobs should run on one or all servers Note We use the whenever to automatically rewrite the crontab when we deploy. You have...

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?

...with your mentor. In particular: How much load does each implementation cause on the server? Can you withdraw access permissions from someone who used to have them? Hint

When you add or change an initializer you need to restart your Rails server or console for the changes to be picked up. Only changes in app are picked...

...application you often need to move data between the client (HTML, Javascript) and the server (Ruby, Rails). Step 1: Moving HTML snippets Add a find-as-you-type search to...

In this step, the rendering of the search results should happen on the server. So the client is pulling snippets of HTML from the server. For the part of...

...know from Rails? Practice Checkout the repo for the makandra blog Start the preview server Make some changes, review them on localhost:4567 Add a new page /animals/your-favorite-animal that has...

...add the following line to your config/environments/development.rb: config.assets.compile = false config.assets.debug = false Then restart your server. This mimicks how applications work in production. Now reload your page. It will probably show...

...how to add Stylesheets how to add images how to use the Webpack dev server One more thing about Yarn / npm There is one significant difference between JavaScript package managers...

Best results in other decks

Understanding your type of cronjob Some cronjobs must only run on a single server. E.g. when you run nightly batch operations on the database, it should probably run on a...

...single server. Running it on multiple servers would likely result in deadlocks or corrupt data. Some cronjobs must always run on all servers. E.g. starting a sidekiq process on reboot...

Sometimes you need to access a dev server running on localhost from another machine that is not part of the same network. Maybe you want to use your phone to...

...the past, we often used some port forwarding or other techniques to expose the service to the internet. Enter ngrok, a command line tool that gives you an on-the...

Search in all decks