Nomadic Coding
Nomadic Coding shares insights, tips, and tutorials on coding and software development. Join us as we explore the world of programming one step at a time!
24/11/2024
Khoá học golang cho anh em !
Checkout:
GitHub - techschool/simplebank: Backend master class: build a simple bank service in Go Backend master class: build a simple bank service in Go - techschool/simplebank
09/11/2024
Make color with github 😁
Check here:
GitHub - Shpota/github-activity-generator: A script that helps generate a rich GitHub Contribution Graph for your account 🤖 A script that helps generate a rich GitHub Contribution Graph for your account 🤖 - Shpota/github-activity-generator
19/10/2024
𝗪𝗵𝗲𝗻 𝘁𝗼 𝘂𝘀𝗲 𝗚𝗿𝗮𝗽𝗵𝗤𝗟, 𝗴𝗥𝗣𝗖, 𝗮𝗻𝗱 𝗥𝗘𝗦𝗧?
Developers can choose from various client-server communication protocols when designing an application. Utilizing GraphQL, gRPC, and REST is relatively common in modern projects. Each protocol can provide multiple advantages depending on the application's requirements.
𝗚𝗿𝗮𝗽𝗵𝗤𝗟 is a flexible approach for making data requests that focuses on specific requests and provides only necessary ones. The fact that GraphQL is client-driven distinguishes it from other APIs. The client makes all the decisions instead of handling them the standard way. Its 𝗮𝗱𝘃𝗮𝗻𝘁𝗮𝗴𝗲 is that it is language agnostic, requests are made through a single endpoint, and it is strongly typed, as it has schemas.
𝗥𝗘𝗦𝗧 is the most popular one. It is a great fit when a domain can be described as a set of resources. REST is a stateless architecture for data transfer. Some 𝗮𝗱𝘃𝗮𝗻𝘁𝗮𝗴𝗲𝘀 of REST are that it is a well-established standard, is simple to use, and has good caching support.
𝗴𝗥𝗣𝗖 is a method that offers a lightweight and rapid system for obtaining data. Here, the primary distinction is how it describes its contract negotiations. It relies on contracts; the architecture is not what governs the negotiation; it is the relationship between the server and the client. While handling and calculations are delegated to a remote server housing the resource, most power is used on the client side. Its main 𝗮𝗱𝘃𝗮𝗻𝘁𝗮𝗴𝗲𝘀 are that it has lightweight clients, is highly efficient as it uses protocol buffers to send/receive data, and is open source, too.
So, 𝘄𝗵𝗲𝗻 𝘁𝗼 𝗰𝗵𝗼𝗼𝘀𝗲 each of those protocols:
✅ Use 𝗥𝗘𝗦𝗧 if you're building a CRUD-style web application or you work with well-structured data.
✅ Use 𝗴𝗥𝗣𝗖 if your API is private and about actions or if performances are essential.
✅ Use 𝗚𝗿𝗮𝗽𝗵𝗤𝗟 if you have a public API that needs to be flexible in customizing requests and want to add data from different sources into a public API.
Each of these choices has specific uses and benefits. In this case, there is no clear winner, so what you should use—or, more, what you want to use—depends on your objectives and strategy.
Source: Dr Milan Milanović
26/08/2024
Open source self-host VPN cho anh em nào cần!!!
Check here:
GitHub - amnezia-vpn/amnezia-client: Amnezia VPN Client (Desktop+Mobile) Amnezia VPN Client (Desktop+Mobile). Contribute to amnezia-vpn/amnezia-client development by creating an account on GitHub.
23/08/2024
Open source shop online bằng Nextjs cho mọi người sử dụng!
Check here:
GitHub - huanghanzhilian/c-shopping: A beautiful shopping platform developed with Next.js, tailored for various devices including Desktop, Tablet, and Phone. 基于Nextjs开发同时适配Desktop、Tablet、Phone多种设备的精美购物平台 A beautiful shopping platform developed with Next.js, tailored for various devices including Desktop, Tablet, and Phone. 基于Nextjs开发同时适配Desktop、Tablet、Phone多种设备的精美购物平台 - huanghanzhilian/c-shopping
20/08/2024
Các ý tưởng làm app mn có thể tham khảo 📣
Check here:
GitHub - florinpop17/app-ideas: A Collection of application ideas which can be used to improve your coding skills. A Collection of application ideas which can be used to improve your coding skills. - florinpop17/app-ideas
17/08/2024
Serial: Những cập nhập thay đổi mới trong Rails 7.2
Omakase Rubocop Linter / Formatter Rules in Rails 7.2
Các ứng dụng Rails hiện nay mặc định được cấu hình với RuboCop sử dụng một tập hợp quy tắc từ rubocop-rails-omakase.
Check here: https://github.com/rails/rubocop-rails-omakase
16/08/2024
Serial: Những cập nhập thay đổi mới trong Rails 7.2
Rate Limiting in Rails 7.2
- `Rate limit` hay giới hạn tốc độ thường được áp dụng để ngăn chặn việc một hệ thống nhận quá nhiều yêu cầu trong một khoảng thời gian nhất định. Điều này bảo vệ hệ thống khỏi bị quá tải.
- Bạn có thể tuỳ chỉnh các hành động nào bị giới hạn thông qua `before_action filters`, cụ thể là chọn chỉ giới hạn vài hành động với `only:` hoặc loại trừ vài hành động bằng `except:`.
- Mặc định, các giới hạn này sẽ dựa vào địa chỉ IP của người dùng gửi yêu cầu. Nhưng nếu bạn muốn thay đổi cách nhận diện người dùng, bạn có thể truyền vào một hàm thông qua tham số `by:`.
- Khi một yêu cầu vượt quá giới hạn, người dùng sẽ nhận phản hồi với mã 429. Tuy nhiên, bạn có thể thay đổi phản hồi này bằng cách truyền vào một hàm khác thông qua tham số `with:`.
- Bộ nhớ được sử dụng để lưu trữ thông tin về giới hạn tốc độ là ActiveSupport::Cache, và bạn có thể cấu hình nơi lưu trữ riêng nếu không muốn sử dụng bộ nhớ chung với các bộ nhớ cache khác.
16/08/2024
Chuyển text thành giọng crush của bạn ngọt hơn cả mật nào =))))
Link dưới comment!
15/08/2024
Serial: Những cập nhập thay đổi mới trong Rails 7.2
Browser Guard in Rails 7.2
Trong Rails, giờ đây chúng ta có thể thiết lập phiên bản trình duyệt nào được phép truy cập vào tất cả các hành động (hoặc chỉ một số, nếu giới hạn bằng `only:` hoặc `except:`).
Chỉ những trình duyệt được liệt kê trong hash hoặc tập hợp tên được truyền vào `versions:` mới bị chặn nếu phiên bản của chúng thấp hơn mức yêu cầu.
Điều này có nghĩa là tất cả các trình duyệt không xác định khác, cũng như các tác nhân (agents) không gửi thông tin về `user-agent header`, sẽ vẫn được phép truy cập.
Nếu một trình duyệt bị chặn, mặc định nó sẽ được gửi tới file `public/406-unsupported-browser.html` với mã trạng thái HTTP là "406 Not Acceptable".
Source: https://edgeapi.rubyonrails.org/classes/ActionController/AllowBrowser/ClassMethods.html -i-allow_browser
Click here to claim your Sponsored Listing.
Category
Website
Address
11300