Skip to main content

Kuruntokai - Verse 02

· 4 min read
Anand Raja
Senior Software Engineer

கொங்கு தேர் வாழ்க்கை

2. குறிஞ்சி - தலைவன் கூற்று

கொங்கு தேர் வாழ்க்கை அஞ்சிறைத் தும்பி!
காமம் செப்பாது, கண்டது மொழிமோ:
பயிலியது கெழீஇய நட்பின், மயில் இயல்,
செறி எயிற்று, அரிவை கூந்தலின்
நறியவும் உளவோ, நீ அறியும் பூவே?

இயற்கைப் புணர்ச்சி புணர்ந்தவழி, தலைமகளை இயற்கைப் புணர்ச்சிக்கண் இடையீடுபட்டு நின்ற தலைமகன், நாணின் நீக்குதற்பொருட்டு, மெய் தொட்டுப் பயிறல் முதலாயின அவள்மாட்டு நிகழ்த்திக

குறுந்தொகை - 02
பாடியவர் - இறையனார்

Browser Engines - Digest

· 7 min read
Anand Raja
Senior Software Engineer

A JavaScript engine and a render engine are both important components of a web browser. However, they have different functions. This guide explores browser engines, their implementations, and specialized Firefox-based alternatives that offer enhanced privacy, performance, and customization options.

JavaScript Engine

A JavaScript engine is responsible for executing JavaScript code. JavaScript is a programming language that is used to add interactivity to web pages. When a web page contains JavaScript code, the browser's JavaScript engine is responsible for parsing and executing JS code. It uses JIT compilation for improved performance.

Render Engine

A render(rendering) engine is responsible for displaying the content of a web page on the screen. This includes the HTML, CSS, and JavaScript code. The render engine takes the code and converts it into a visual representation that can be displayed on the screen. In browsers, it works in conjunction with the JavaScript engine via the DOM(Document Object Model). A rendering engine is also known as a browser engine or layout engine. A browser engine is a core software component of every major web browser.

How to Fix WSL2 & VPN Connectivity Issues

· 10 min read
Anand Raja
Senior Software Engineer

Comprehensive guide to fix WSL2 and Cisco AnyConnect VPN internet connectivity issues.

There is a known issue with DNS forwarding in WSL2 and WSL1 when using VPN (see GitHub Issue #1350). Additionally, there are specific problems with Cisco AnyConnect VPN client. This guide provides workarounds for these issues and should work for Ubuntu and Debian distributions.

The Problem - Common Symptoms

When connected to Cisco AnyConnect VPN, you may encounter the following DNS resolution failures:

  • Package updates fail - sudo apt update displays errors like:
Err:1 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Temporary failure resolving 'archive.ubuntu.com'
  • Git operations fail - git pull displays errors like:
// code-block-error-line
fatal: unable to access 'https://github.com/actionanand/wiki.git/': Could not resolve host: github.com
  • Network connectivity fails - ping google.com displays:
ping: google.com: Temporary failure in name resolution

JS Regex Helper

· 9 min read
Anand Techie
Software Developer, Frontend

A regular expression , also known as regex or regexp , is a sequence of characters that define a search pattern. It can be used to search, edit, or manipulate text and data.

In JavaScript, regular expressions are created using the RegExp object . The RegExp object has a number of methods that can be used to search for and manipulate strings.

Here are some examples of regular expressions in JavaScript:

// Find all occurrences of the letter "a" in a string
const regex = /a/g;
const string = "This is a string.";
const matches = regex.exec(string);

// Replace all occurrences of the letter "a" with the letter "e" in a string
const regex = /a/g;
const string = "This is a string.";
const newString = string.replace(regex, "e");

// Check if a string contains a particular pattern
const regex = /^abc/g;
const string = "abc123";
const match = regex.test(string);

Which came first?

· One min read
Anand Raja
Senior Software Engineer
Anand Techie
Software Developer, Frontend

You've heard the age-old riddle: "Which came first: the chicken or the egg?" Taken metaphorically, it's a meditation on the futility of determining the cause of a self-perpetuating cycle. Taken literally, it's a great question for evolutionary biologists.

Chickens come from eggs, but eggs come from chickens. So which came first?

Centering a Text Inside a Button

· One min read
Anand Raja
Software Developer
Anand Techie
Software Developer, JS Specialist

Instead of centering headings and paragraphs, let’s center text inside another element (<button> </button>). Aligning the button, and the text inside the button, would differ slightly from the examples.

That’s because the text-align property only works on the content inside block-level elements, such as headings and paragraphs, and not inline elements, such as buttons.

So here's what we'll do instead:

  • Wrap the button in a div
  • Then, add an inline style declaration to the div, i.e. <div style="text-align:center">.