mahesh.bhosle
Thu Jan 18 2024
The web-socket APIs in AWS API Gateway service use different integrations to send the incoming requests to backend service. Two of them being HTTP
and HTTP_PROXY
. key difference lies in how the communication between API Gateway and the backend service is handled. HTTP integration involves translating WebSocket requests into HTTP requests, while HTTP proxy integration forwards WebSocket requests directly to the backend service without modification
mahesh.bhosle
Wed Jan 17 2024
While using tfenv
tool for using multiple terraform version, we can use TFENV_ARCH
variable to set the system architecture. This helps a lot when we need to use terraform amd64 binary on the arm64 device.
eg: to use amd64 binary for terraform 0.14.0, we can use the following command: TFENV_ARCH=amd64 tfenv install 0.14.0
ashwanikumarjha
Mon Jan 15 2024
In Next.js, we can organize our routes into groups without affecting the URL path. This can be done by wrapping a folder's name in parentheses, like (group).
Let's say we have an e-commerce application, we might have different sections like "electronics", and "clothing". Even though these sections have different URLs, we can group them in our code using route groups.
app/ ├─ (electronics)/ │ ├─ electronic1/ │ │ ├─ page.tsx │ ├─ electronic2/ │ │ ├─ page.tsx ├─ (clothings)/ │ ├─ clothing1/ │ │ ├─ page.tsx │ ├─ clothing2/ │ │ ├─ page.tsx
In this structure, the URL paths will be /electronic1, /electronic2, /clothing1, /closthin2 etc, regardless of the category they belong to.
While route groups don't affect the URL structure, they still allow us to create different layouts for each group by adding a layout.js file inside their folders.
iffyuva
Sat Jan 13 2024
In order to check DNS settings and the resolved IPs, visit about:networking#dns in Firefox
satya
Fri Jan 12 2024
we can interact with browser events like click
on a element in rails using Stimulus
Make sure you have @hotwired/stimulus
installed .
Generate a stimulus controller by running the below commands.
./bin/rails generate stimulus controllerName
./bin/rails stimulus:manifest:update
Here , say my controllerName is tooltip
, this will create a controller called tooltip_controller.js
in app/javascripts/controllers
directory & also link the file in app/javascripts/controllers/index.js
.
For eg: my functionality is i want to toggle the tooltip visibility so the controller code will look like this
import { Controller } from "@hotwired/stimulus";
// Connects to data-controller="tooltip"
export default class extends Controller {
connect() {}
toggleToolTip(event) {
event.preventDefault();
this.element.lastElementChild.classList.toggle("hidden");
}
}
And in your view file we need to wrap our parent div with an attribute called data-controller="tooltip"
so the code will look like this
<div class="relative" data-controller="tooltip">
<%= link_to "#", id: "avatar-link", data: { action: "click->tooltip#toggleToolTip" } do %>
<%= image_tag(your_image, alt: "Avatar", class: "...classnames") %>
<% end %>
<div class="..classnames hidden" id="tooltip-container">
... your tooltip contents
</div>
</div>
so here on click of the image it will toggle the tooltip container , if you take a close look on -> data: { action: "click->tooltip#toggleToolTip" }
this is simply saying perform the click
action on tooltip
controller using toggleToolTip
method defined above.
nisanth
Mon Jan 08 2024
AWS DeepLens is a deep learning-enabled video camera designed for developers to get hands-on experience with machine learning. What makes it intriguing is that it brings machine learning capabilities directly to the edge. With DeepLens, you can build and deploy deep learning models on the device itself, allowing it to process and analyze video streams in real-time
Satya
Tue Dec 26 2023
we need to add chat:write
scope in bot token scopes, so that our bot can send messages in the channel when it is mentioned.
Satya
Tue Dec 26 2023
with modern Sign in with Slack
we need to request the OpenID scopes—openid
, email
, and profile
.
Satya
Tue Dec 26 2023
writing integration specs using RSpec and Capybara.
Satya
Tue Dec 26 2023
we need to add the user scopes email
& profile
when we are using the slack openid.connect.userInfo
api method.
Showing 19 to 21 of 66 results