tutorial

Lighthouse vs. PageSpeed Insights: The Lack of Correlation

Lighthouse vs. PageSpeed Insights: The Lack of Correlation

What's the problem? Have you ever run PageSpeed Insights (PSI) on your website only to receive a wildly different performance score than when running Lighthouse via Chrome Developer Tools? Let me show you what I mean: The overall scores are relatively similar, but there is almost no correlation between the metrics that make them up. This is a problem because you cannot run PageSpeed Insights on your local build of the website, forcing you to publish any changes and test them online, which is slow, inconvenient, and a bad practice. The reason for the discrepancy PageSpeed uses Lighthouse under the…
Read More
Running Jobs in a Container via GitHub Actions Securely

Running Jobs in a Container via GitHub Actions Securely

Like any modern CI/CD platform, GitHub allows users to run CI jobs in a container. This is great for running consistent and reproducible CI jobs as well as reducing the amount of setup steps that is required for the job to run (e.g., running actions/setup-python to install Python environment and installing necessary packages via pip) as those environments and dependencies can be baked into the container. In order to make use of this feature, in the GitHub yaml file, specify the container to run any steps in a job via jobs.<job_id>.container. This will tell GitHub to spin up a container…
Read More
Common Ports and Protocols

Common Ports and Protocols

Common Ports and Protocols: The Backbone of Network Communication Understanding how data is exchanged over networks is fundamental for anyone diving into the world of computer science, cybersecurity, or IT in general. At the core of this understanding lie ports and protocols, which together form the foundation of network communication. Let's explore what these terms mean and why they're so crucial. What are Ports and Protocols? Protocols are sets of rules that dictate how data is formatted, transmitted, and received over a network. They ensure that devices can communicate with each other effectively, despite differences in hardware, software, or operating…
Read More
#37 — Replace Duplicate Items with The Specified Text

#37 — Replace Duplicate Items with The Specified Text

Problem description & analysis: In the Excel table below, the 1st column contains sequence numbers and the 2nd column has duplicate values. Task: Record the value appearing for the first time in the 2nd column and replace its duplicates with the string "cont.". Solution: Use SPL XLL to enter the following formula: =spl("=((d=E(?))d.group@1(Date)).(Date=$[cont.]),d",A1:B8) Enter fullscreen mode Exit fullscreen mode As shown in the picture below: Explanation: E() function converts the data range to a two-dimensional table. group@1 groups rows and retrieves the 1st row of each group. The operator finds the difference of two sets. Source link lol
Read More
#36 — Match The First Part of The Cell Value

#36 — Match The First Part of The Cell Value

Problem description & analysis:An Excel worksheet has multiple columns of source data that contains empty cells, as the following range C3:D19 shows. It also contains data items, which are separated into two parts by “-”, used for comparisons, as range F3:F7 shows. Task: Compare each column of the source data with the first part of the data item, and after each column of data, list all matching data items, as shown below: Solution:Use SPL XLL to do this: =spl("=d=transpose@n(?1),transpose@n(d.(E@1(?2).select(d.~.pos(substr@l(~,$[-])))))",C3:D19,F3:F7) Enter fullscreen mode Exit fullscreen mode As shown in the picture below: Explanation:transpose@n function transposes a sequence. E@1 convers a multilayer…
Read More
top 5 tools

top 5 tools

As a Developer, there's so much to learn, and it's very important to focus on the things that actually matter! Many developers prefer building things from scratch, but sometimes the workload is so huge that using these tools can make the job easier. In this article, I'll share 5 tools that can make you super productive and better at doing what you do the best "Build Cool Stuff" Source link lol
Read More
JavaScript and HTML

JavaScript and HTML

In the world of web development, three core technologies come together to create the web pages we interact with daily: HTML, CSS, and JavaScript. Each of these technologies serves a unique purpose and works in harmony to bring web pages to life. Let's dive deeper into how these components function and complement each other, using a simple analogy of a stick figure on a post-it note. HTML (HyperText Markup Language) is the backbone of any web page. It defines the structure and layout of the content on the page. Think of HTML as the skeleton of a webpage, providing the…
Read More
How to Debug Scripts in Bash

How to Debug Scripts in Bash

When I was first starting out with some command line automation and development, I remember spending many hours trying to find the error in my code, and in the end, it could be something very simple, like a comma. You may have faced the same situation as well. Knowing how to use proper debugging technique will help you resolve errors quickly. Unlike other languages, there is no debugging tool for bash where you can set breakpoints, step through code, etc. But you can enable some options in your scripts for debugging, which can help you, as follows: Enable debugging flags…
Read More
How to Build Your Own Distributed KV Storage System Using the etcd Raft Library (2)

How to Build Your Own Distributed KV Storage System Using the etcd Raft Library (2)

This is the second article in the series "How to Build Your Own Distributed KV Storage System Using the etcd raft Library" - raftexample Log Compaction and Snapshot. Introduction In the first article, we learned and became familiar with the structure of raftexample and the processing flow of a write request. In this article, we will interpret the log compaction and snapshot handling logic in raftexample. Log Compaction and Snapshot The Raft log continuously grows as the cluster operates normally and processes client requests. In practical applications, we need a mechanism to limit the unlimited growth of the log to…
Read More
Space Defender – part 4 – Adding a HUD

Space Defender – part 4 – Adding a HUD

In the previous part we created the enemies and shot them down. In this part we'll add a HUD (Heads Up Display) to show the player's lives, level, and score. Adding a HUD We're going to add a HUD to the game. This will show the player's lives, level, and score. We'll use a simple HTML structure for this, and some CSS to make it look nice.In bigger games the HUD is usually part of the game canvas, but for this tutorial we'll keep it separate to keep things simple. In part 1 we already added all the HTML and…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.