- You MUST NOT try and generate a Rails app from scratch on your own by generating each file. For a NEW app you MUST use
rails newfirst to generate all of the boilerplate files necessary. - Create an app in the current directory with
rails new . - Use Tailwind CSS for styling. Use
--css tailwindas an option on therails newcall to do this automatically. - Use Ruby 3.2+ and Rails 8.0+ practices.
- Use the default Minitest approach for testing, do not use RSpec.
- Default to using SQLite in development.
rails newwill do this automatically but take care if you write any custom SQL that it is SQLite compatible. - An app can be built with a devcontainer such as
rails new myapp --devcontainerbut only do this if requested directly. - Rails apps have a lot of directories to consider, such as app, config, db, etc.
- Adhere to MVC conventions: singular model names (e.g., Product) map to plural tables (products); controllers are plural.
- Guard against incapable browsers accessing controllers with `allo
| # Window Navigation | |
| Mod j / k : Focus next / prev window | |
| Mod Enter : Move to master | |
| Mod Tab : Prev tag | |
| # Window Management | |
| Mod h / l : Shrink / Grow master | |
| Mod Shift c : Close window | |
| Mod Shift Space : Toggle float | |
| Mod Shift f : Fullscreen |
| title | tags | |||||
|---|---|---|---|---|---|---|
Common Webpage Layouts With TailwindCSS Using CSS Grid & Flex box (w/ Code Examples) |
|
- CSS Grid: for the main page layout (header, main content, sidebar, footer)
- CSS Flexbox: for smaller components within those grid areas (like navigation menus, lists of items, or aligning content within a section)
| package com.example.irfan.rest; | |
| import org.springframework.boot.actuate.health.HealthEndpoint; | |
| import org.springframework.http.MediaType; | |
| import org.springframework.http.ResponseEntity; | |
| import org.springframework.web.bind.annotation.GetMapping; | |
| import org.springframework.web.bind.annotation.RequestMapping; | |
| import org.springframework.web.bind.annotation.RestController; | |
| @RestController |
| const http = require('http'); | |
| const fs = require('fs'); | |
| const url = require('url'); | |
| // Simulated user data | |
| const users = [ | |
| { id: 1, username: 'john_doe', password: 'password123' }, | |
| { id: 2, username: 'jane_smith', password: 'example456' } | |
| ]; |
| # proxy to vnc port | |
| ngrok tcp --region=us --remote-addr=1.tcp.ngrok.io:99999 5900 | |
| # or via Docker. Tunnel ports are random and will be specific to your tunnel | |
| docker run -it -e NGROK_AUTHTOKEN=1232121212 ngrok/ngrok tcp 5900 --region=us --remote-addr=7.tcp.ngrok.io:99999 |
In this series of pages, I will discuss project reactor and reactive programming from basic concepts to reactor internal implementation details. This discussion is based on the official reference documentation, the java-doc, talks by maintainers of reactor e.g. at the spring I/O and other distributed material, and should summarise and connect all this information. It should complement the official reference documentation and java-doc. Although the name says "from zero to hero", basic knowledge about the library is advised to fully benefit from it.
As a short disclaimer, I am a professional software engineer with some years of experience in using reactor, but not a maintainer or creator of the library. Information and knowledge in this post are based on the official documentation and talks, but I cannot exclude misconceptions on my side.
- [Why and when to use Reactor](https://gist.github.com/Lukas-Krickl/50f1daebebaa72c7e944b7c319e3c073#file-01-why-and-when-to-use
Standard set of Common Gateway Interface environment variable are described in RFC3875. For example:
CONTENT_TYPE=application/x-www-form-urlencoded
GATEWAY_INTERFACE=CGI/1.1
REMOTE_ADDR=192.168.1.180
QUERY_STRING=Zbr=1234567&SrceMB=&ime=jhkjhlkh+klhlkjhlk+%A9%D0%C6%AE%C6%AE&prezime=&sektor=OP
REMOTE_PORT=2292