<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Fix, Build, Automate]]></title><description><![CDATA[Straightforward solutions for modern tech problems]]></description><link>https://blog.rinoreji.in</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 07:56:39 GMT</lastBuildDate><atom:link href="https://blog.rinoreji.in/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Fetch the DB Object Backed by an External Database]]></title><description><![CDATA[SELECT
    OBJECT_SCHEMA_NAME(d.referencing_id) AS referencing_schema,
    OBJECT_NAME(d.referencing_id)        AS referencing_object,
    o.type_desc                          AS referencing_type,
   ]]></description><link>https://blog.rinoreji.in/fetch-the-db-object-backed-by-an-external-database</link><guid isPermaLink="true">https://blog.rinoreji.in/fetch-the-db-object-backed-by-an-external-database</guid><category><![CDATA[copilot]]></category><category><![CDATA[SQL Server]]></category><dc:creator><![CDATA[Rino Reji Cheriyan]]></dc:creator><pubDate>Mon, 13 Apr 2026 17:08:29 GMT</pubDate><content:encoded><![CDATA[<pre><code class="language-sql">SELECT
    OBJECT_SCHEMA_NAME(d.referencing_id) AS referencing_schema,
    OBJECT_NAME(d.referencing_id)        AS referencing_object,
    o.type_desc                          AS referencing_type,
    d.referenced_database_name,
    d.referenced_schema_name,
    d.referenced_entity_name
FROM sys.sql_expression_dependencies d
JOIN sys.objects o 
    ON o.object_id = d.referencing_id
WHERE o.type IN ('P','V') -- P = SQL Stored Procedure, V = View
  AND d.referenced_database_name IS NOT NULL
  AND d.referenced_database_name &lt;&gt; DB_NAME()
ORDER BY d.referenced_database_name, referencing_type, referencing_schema, referencing_object;
</code></pre>
<p>Gives database object which uses external database.</p>
]]></content:encoded></item><item><title><![CDATA[Reveal Your Wi-Fi Passwords on Windows 10/11 Through Command Prompt]]></title><description><![CDATA[View saved Wi-Fi passwords on Windows 10/11 using Command Prompt.
Open Command Prompt as an administrator.
To list saved Wi-Fi profiles
netsh wlan show profiles

To view the password of a profile
netsh wlan show profile name="NETWORK NAME" key=clear
...]]></description><link>https://blog.rinoreji.in/reveal-your-wi-fi-passwords-on-windows-1011-through-command-prompt</link><guid isPermaLink="true">https://blog.rinoreji.in/reveal-your-wi-fi-passwords-on-windows-1011-through-command-prompt</guid><category><![CDATA[Command prompt]]></category><category><![CDATA[wifi]]></category><category><![CDATA[netsh]]></category><category><![CDATA[Wlan]]></category><dc:creator><![CDATA[Rino Reji Cheriyan]]></dc:creator><pubDate>Wed, 19 Nov 2025 06:55:48 GMT</pubDate><content:encoded><![CDATA[<p><strong>View saved Wi-Fi passwords on Windows 10/11 using Command Prompt.</strong></p>
<p>Open Command Prompt as an administrator.</p>
<p>To list saved Wi-Fi profiles</p>
<pre><code class="lang-bash">netsh wlan show profiles
</code></pre>
<p>To view the password of a profile</p>
<pre><code class="lang-bash">netsh wlan show profile name=<span class="hljs-string">"NETWORK NAME"</span> key=clear
</code></pre>
<blockquote>
<p>Learn how to view saved Wi-Fi passwords on Windows 10/11 using Command Prompt. Open as an administrator, list saved profiles with `netsh wlan show profiles`, and view a specific profile's password using `netsh wlan show profile name="NETWORK NAME" key=clear`.</p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[Automate Relay Control with Tasmota's Timer Feature]]></title><description><![CDATA[//turn off Rule1
Rule1 0

//Clear Rule1
Rule1 ""

//Rule to turn on relay on boot and then toggle the state every 1800 seconds
Rule1 on System#Boot do backlog RuleTimer1 1800; Power1 ON endon on Rules#Timer=1 do backlog Power1 Toggle; RuleTimer1 1800...]]></description><link>https://blog.rinoreji.in/automate-relay-control-with-tasmotas-timer-feature</link><guid isPermaLink="true">https://blog.rinoreji.in/automate-relay-control-with-tasmotas-timer-feature</guid><category><![CDATA[iot]]></category><category><![CDATA[tasmota]]></category><category><![CDATA[home automation]]></category><dc:creator><![CDATA[Rino Reji Cheriyan]]></dc:creator><pubDate>Tue, 04 Nov 2025 03:33:24 GMT</pubDate><content:encoded><![CDATA[<pre><code class="lang-plaintext">//turn off Rule1
Rule1 0

//Clear Rule1
Rule1 ""

//Rule to turn on relay on boot and then toggle the state every 1800 seconds
Rule1 on System#Boot do backlog RuleTimer1 1800; Power1 ON endon on Rules#Timer=1 do backlog Power1 Toggle; RuleTimer1 1800 endon

//turn on Rule1
Rule1 1
</code></pre>
<p><a target="_blank" href="https://tasmota.github.io/docs/Rules/">Rules</a></p>
<p><a target="_blank" href="https://tasmota.github.io/docs/Timers/">Timers</a></p>
<p><a target="_blank" href="https://tasmota.github.io/docs/Commands/">Commands</a></p>
<pre><code class="lang-plaintext">//Version 2

Rule1
ON System#Boot DO Power1 1 ENDON
ON Power1#State=1 DO RuleTimer1 1800 ENDON
ON Rules#Timer=1 DO Power1 0 ENDON
ON Power1#State=0 DO RuleTimer2 1800 ENDON
ON Rules#Timer=2 DO Power1 1 ENDON
</code></pre>
]]></content:encoded></item><item><title><![CDATA[Dynamic API Routing with Azure APIM: Leveraging Query Strings for Enhanced Flexibility]]></title><description><![CDATA[Azure API Management (APIM) allows developers to manage and secure APIs effectively. One of its powerful features is the ability to switch APIs based on query string values. This capability enables dynamic routing and customization of API responses, ...]]></description><link>https://blog.rinoreji.in/dynamic-api-routing-with-azure-apim-leveraging-query-strings-for-enhanced-flexibility</link><guid isPermaLink="true">https://blog.rinoreji.in/dynamic-api-routing-with-azure-apim-leveraging-query-strings-for-enhanced-flexibility</guid><category><![CDATA[APIM]]></category><category><![CDATA[Azure]]></category><dc:creator><![CDATA[Rino Reji Cheriyan]]></dc:creator><pubDate>Thu, 22 May 2025 11:32:11 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/10sT1XNZS78/upload/98cb994a923e2c4457a7babb5646da28.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Azure API Management (APIM) allows developers to manage and secure APIs effectively. One of its powerful features is the ability to switch APIs based on query string values. This capability enables dynamic routing and customization of API responses, enhancing flexibility and control over API behavior.</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">policies</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">inbound</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">base</span> /&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">choose</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">when</span> <span class="hljs-attr">condition</span>=<span class="hljs-string">"@(context.Request.Url.Query.GetValueOrDefault("</span><span class="hljs-attr">qstringKey</span>","")==<span class="hljs-string">"value"</span>)"&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">set-backend-service</span> <span class="hljs-attr">base-url</span>=<span class="hljs-string">"https://service1.azurewebsites.net/api"</span> /&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">when</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">otherwise</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">set-backend-service</span> <span class="hljs-attr">base-url</span>=<span class="hljs-string">"https://service2.azurewebsites.net/api"</span> /&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">otherwise</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">choose</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">inbound</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">policies</span>&gt;</span>
</code></pre>
]]></content:encoded></item><item><title><![CDATA[Azure API Management: A Guide to Load Balancing OpenAI Instances]]></title><description><![CDATA[Azure API Management policy for load balancing Azure OpenAI instances can be a powerful tool for optimizing performance and ensuring reliability. By distributing requests across multiple instances, you can enhance the scalability and availability of ...]]></description><link>https://blog.rinoreji.in/azure-api-management-a-guide-to-load-balancing-openai-instances</link><guid isPermaLink="true">https://blog.rinoreji.in/azure-api-management-a-guide-to-load-balancing-openai-instances</guid><category><![CDATA[Azure]]></category><category><![CDATA[openai]]></category><category><![CDATA[APIM]]></category><category><![CDATA[Load Balancing]]></category><dc:creator><![CDATA[Rino Reji Cheriyan]]></dc:creator><pubDate>Thu, 17 Apr 2025 04:26:13 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/fN603qcEA7g/upload/d6d402bb768c143551291675c8b937b5.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Azure API Management policy for load balancing Azure OpenAI instances can be a powerful tool for optimizing performance and ensuring reliability. By distributing requests across multiple instances, you can enhance the scalability and availability of your OpenAI services. This approach not only improves response times but also provides a robust framework for managing traffic efficiently.</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">policies</span>&gt;</span>
    <span class="hljs-comment">&lt;!-- Throttle, authorize, validate, cache, or transform the requests --&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">inbound</span>&gt;</span>
        <span class="hljs-comment">&lt;!--&lt;set-backend-service id="lb-backend" backend-id="openai-pool" /&gt;--&gt;</span>
        <span class="hljs-comment">&lt;!-- Route requests based on the roundRobinIndex value --&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">base</span> /&gt;</span>
        <span class="hljs-comment">&lt;!-- Try to get value for roundRobinIndex from cache and set it as a variable roundRobinIndex --&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">cache-lookup-value</span> <span class="hljs-attr">key</span>=<span class="hljs-string">"roundRobinIndex"</span> <span class="hljs-attr">default-value</span>=<span class="hljs-string">"0"</span> <span class="hljs-attr">variable-name</span>=<span class="hljs-string">"roundRobinIndex"</span> /&gt;</span>
        <span class="hljs-comment">&lt;!-- Get a new index in round robin fasion and store it into cache --&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">cache-store-value</span> <span class="hljs-attr">key</span>=<span class="hljs-string">"roundRobinIndex"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"
        @{
            var index = Convert.ToInt32(context.Variables.GetValueOrDefault("</span><span class="hljs-attr">roundRobinIndex</span>","<span class="hljs-attr">0</span>"));
            <span class="hljs-attr">return</span> ((<span class="hljs-attr">index</span> + <span class="hljs-attr">1</span>) % <span class="hljs-attr">3</span>)<span class="hljs-attr">.ToString</span>(); // <span class="hljs-attr">Assuming</span> <span class="hljs-attr">you</span> <span class="hljs-attr">have</span> <span class="hljs-attr">3</span> <span class="hljs-attr">backends</span>
        }
        " <span class="hljs-attr">duration</span>=<span class="hljs-string">"100"</span> /&gt;</span>
        <span class="hljs-comment">&lt;!-- Get a new backend using the index generated above--&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">set-variable</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"backendId"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"
        @{
            var backendsIds = new[] { "</span><span class="hljs-attr">dev-openai-backend</span>", "<span class="hljs-attr">qa-openai-backend</span>", "<span class="hljs-attr">uat-openai-backend</span>" };
            <span class="hljs-attr">var</span> <span class="hljs-attr">index</span> = <span class="hljs-string">Convert.ToInt32(context.Variables[</span>"<span class="hljs-attr">roundRobinIndex</span>"]);
            <span class="hljs-attr">return</span> <span class="hljs-attr">backendsIds</span>[<span class="hljs-attr">index</span>];
        }" /&gt;</span>
        <span class="hljs-comment">&lt;!-- Set new backend for the current request --&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">set-backend-service</span> <span class="hljs-attr">backend-id</span>=<span class="hljs-string">"@((string)context.Variables["</span><span class="hljs-attr">backendId</span>"])" /&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">inbound</span>&gt;</span>
    <span class="hljs-comment">&lt;!-- Control if and how the requests are forwarded to services  --&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">backend</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">base</span> /&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">backend</span>&gt;</span>
    <span class="hljs-comment">&lt;!-- Customize the responses --&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">outbound</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">base</span> /&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">outbound</span>&gt;</span>
    <span class="hljs-comment">&lt;!-- Handle exceptions and customize error responses  --&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">on-error</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">base</span> /&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">on-error</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">policies</span>&gt;</span>
</code></pre>
]]></content:encoded></item><item><title><![CDATA[Fast Method to Obtain All File Info from a Directory Tree]]></title><description><![CDATA[FileList \\Server\Documents > ListOfFiles.csv

FileList is a command-line utility that generates a CSV file listing the contents of a given directory. By default, the list includes the file name, size, and path, as well as the last-access, last-modif...]]></description><link>https://blog.rinoreji.in/fast-method-to-obtain-all-file-info-from-a-directory-tree</link><guid isPermaLink="true">https://blog.rinoreji.in/fast-method-to-obtain-all-file-info-from-a-directory-tree</guid><category><![CDATA[FileList]]></category><category><![CDATA[filesystem]]></category><category><![CDATA[Powershell]]></category><dc:creator><![CDATA[Rino Reji Cheriyan]]></dc:creator><pubDate>Wed, 17 Jul 2024 20:15:42 GMT</pubDate><content:encoded><![CDATA[<pre><code class="lang-powershell">FileList \\Server\Documents &gt; ListOfFiles.csv
</code></pre>
<p><a target="_blank" href="https://www.jam-software.com/filelist">FileList</a> is a command-line utility that generates a CSV file listing the contents of a given directory. By default, the list includes the file name, size, and path, as well as the last-access, last-modified, and creation dates, etc. You can easily import all results to a spreadsheet or database.</p>
<p>This utility supports additional arguments to control what information you need.</p>
<pre><code class="lang-powershell">.\FileList.exe /A * /NOTITLE /ADDITIONALCOLUMNS FILES,ATTRIBUTES <span class="hljs-string">"\\Server\Documents"</span> &gt; ListOfFiles.csv
</code></pre>
<p>In this, you won't have title info, and you will also get the number of files in a folder and their attributes.</p>
<p>If you want to send the output of this utility to both the console and a file, use the <code>Tee-Object</code> in PowerShell.</p>
<pre><code class="lang-powershell">.\FileList.exe /A * /NOTITLE /ADDITIONALCOLUMNS FILES,ATTRIBUTES <span class="hljs-string">"\\Server\Documents"</span> | <span class="hljs-built_in">Tee-Object</span> <span class="hljs-literal">-FilePath</span> <span class="hljs-string">"ListOfFiles.csv"</span>
</code></pre>
]]></content:encoded></item><item><title><![CDATA[How to pass null values to stored procedures from PowerApps]]></title><description><![CDATA[Power apps uses Flow/Automate to call connect to sql and execute a stored procedure. But flow will not allow you to pass Blank/null value from power app.
As a fallback what we can do is, pass a know default value to the flow and in flow check for the...]]></description><link>https://blog.rinoreji.in/how-to-pass-null-values-to-stored-procedures-from-powerapps</link><guid isPermaLink="true">https://blog.rinoreji.in/how-to-pass-null-values-to-stored-procedures-from-powerapps</guid><category><![CDATA[powerapps]]></category><category><![CDATA[PowerAutomate]]></category><dc:creator><![CDATA[Rino Reji Cheriyan]]></dc:creator><pubDate>Wed, 24 Jan 2024 11:20:19 GMT</pubDate><content:encoded><![CDATA[<p>Power apps uses Flow/Automate to call connect to sql and execute a stored procedure. But flow will not allow you to pass Blank/null value from power app.</p>
<p>As a fallback what we can do is, pass a know default value to the flow and in flow check for the known default value and convert it to null in the Execute sp action.</p>
<pre><code class="lang-bash"><span class="hljs-keyword">if</span>(lessOrEquals(triggerBody()[<span class="hljs-string">'Executestoredprocedure(V2)_FieldData'</span>],0),null,triggerBody()[<span class="hljs-string">'Executestoredprocedure(V2)_FieldData'</span>])
</code></pre>
<p>If the current value in the passed value is 0 or less, null will be passed to the db else the original value.</p>
<p>From power app , you can initiate a flow call by the below code</p>
<pre><code class="lang-bash">SampleFlow.Run(If(IsBlankOrError(cmbUser.Selected.ID),-1,cmbUser.Selected.ID),...)
</code></pre>
<p>If the value of <code>cmbUser</code> is null or invalid, -1 will be used when calling the flow. (known default value)</p>
]]></content:encoded></item><item><title><![CDATA[unable to get local issuer certificate (node-gyp, Node, npm)]]></title><description><![CDATA[This should be used only as a temporary fix for development, it exposes you to man-in-the-middle attacks. The long-term solution should be to properly set up SSL certificates.

Windows

set NODE_TLS_REJECT_UNAUTHORIZED=0

Linux

export NODE_TLS_REJEC...]]></description><link>https://blog.rinoreji.in/unable-to-get-local-issuer-certificate-node-gyp-node-npm</link><guid isPermaLink="true">https://blog.rinoreji.in/unable-to-get-local-issuer-certificate-node-gyp-node-npm</guid><category><![CDATA[Node.js]]></category><category><![CDATA[SSL]]></category><category><![CDATA[npm]]></category><category><![CDATA[npm error]]></category><dc:creator><![CDATA[Rino Reji Cheriyan]]></dc:creator><pubDate>Thu, 04 Jan 2024 01:08:44 GMT</pubDate><content:encoded><![CDATA[<p>This should be used only as a temporary fix for development, it exposes you to man-in-the-middle attacks. The long-term solution should be to properly set up SSL certificates.</p>
<ul>
<li>Windows</li>
</ul>
<p><code>set NODE_TLS_REJECT_UNAUTHORIZED=0</code></p>
<ul>
<li>Linux</li>
</ul>
<p><code>export NODE_TLS_REJECT_UNAUTHORIZED=0</code></p>
]]></content:encoded></item><item><title><![CDATA[Use multiple node versions on a machine]]></title><description><![CDATA[TL;DR - Remove existing node installations, install nvm, install node versions under nvm nvm install <version>, use the version nvm use <version>

If you have already installed nodejs, lets start by removing it first

Make a note of the existing vers...]]></description><link>https://blog.rinoreji.in/use-multiple-node-versions-on-a-machine</link><guid isPermaLink="true">https://blog.rinoreji.in/use-multiple-node-versions-on-a-machine</guid><category><![CDATA[Node.js]]></category><category><![CDATA[Productivity]]></category><dc:creator><![CDATA[Rino Reji Cheriyan]]></dc:creator><pubDate>Tue, 02 Jan 2024 11:33:03 GMT</pubDate><content:encoded><![CDATA[<blockquote>
<p>TL;DR - Remove existing node installations, install nvm, install node versions under nvm <code>nvm install &lt;version&gt;</code>, use the version <code>nvm use &lt;version&gt;</code></p>
</blockquote>
<p>If you have already installed nodejs, lets start by <a target="_blank" href="https://stackoverflow.com/questions/20711240/how-to-completely-remove-node-js-from-windows">removing it first</a></p>
<ol>
<li><p>Make a note of the existing version of node and npm</p>
<ol>
<li><pre><code class="lang-bash"> node --version
 npm --version
</code></pre>
</li>
</ol>
</li>
<li><p>Clear cache</p>
<ol>
<li><pre><code class="lang-bash"> npm cache clean --force
</code></pre>
</li>
</ol>
</li>
<li><p>Uninstall nodejs from you machine</p>
</li>
<li><p>Delete all files from the below folders</p>
<ul>
<li><p><code>C:\Program Files (x86)\Nodejs</code></p>
</li>
<li><p><code>C:\Program Files\Nodejs</code></p>
</li>
<li><p><code>C:\Users\{User}\AppData\Roaming\npm</code> (or <code>%appdata%\npm</code>)</p>
</li>
<li><p><code>C:\Users\{User}\AppData\Roaming\npm-cache</code> (or <code>%appdata%\npm-cache</code>)</p>
</li>
<li><p><code>C:\Users\{User}\.npmrc</code> (and possibly check for that without the <code>.</code> prefix too)</p>
</li>
<li><p><code>C:\Users\{User}\AppData\Local\Temp\npm-*</code></p>
</li>
</ul>
</li>
<li><p>Download and install the <a target="_blank" href="https://github.com/coreybutler/nvm-windows/releases"><strong>nvm-setup</strong></a> file for the most recent release</p>
</li>
<li><p>After install take a new terminal and check for the installation using the command <code>where nvm</code></p>
</li>
<li><p>To list the installed node versions <code>nvm ls</code></p>
</li>
<li><p>To list the available node versions to install <code>nvm list available</code></p>
</li>
<li><p>To install required versions, use <code>nvm install &lt;version&gt;</code></p>
</li>
</ol>
<p>All set!, now to use a specific version of node, use the command <code>nvm use &lt;version&gt;</code></p>
<details><summary>References</summary><div data-type="detailsContent"><a target="_blank" href="https://github.com/coreybutler/nvm-windows#installation--upgrades">https://github.com/coreybutler/nvm-windows#installation--upgrades</a>, <a target="_blank" href="https://stackoverflow.com/questions/20711240/how-to-completely-remove-node-js-from-windows">https://stackoverflow.com/questions/20711240/how-to-completely-remove-node-js-from-windows</a>, <a target="_blank" href="https://www.freecodecamp.org/news/node-version-manager-nvm-install-guide/">https://www.freecodecamp.org/news/node-version-manager-nvm-install-guide/</a>, <a target="_blank" href="https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows">https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows</a></div></details>]]></content:encoded></item><item><title><![CDATA[Troubleshooting GitHub cloning issue: SSL certificate problem: unable to get local issuer certificate]]></title><description><![CDATA[Have you ever encountered an SSL certificate problem when trying to clone a repository from GitHub? The error message might look something like this:
SSL certificate problem: unable to get local issuer certificate

This issue can be frustrating, but ...]]></description><link>https://blog.rinoreji.in/troubleshooting-github-cloning-issue-ssl-certificate-problem-unable-to-get-local-issuer-certificate</link><guid isPermaLink="true">https://blog.rinoreji.in/troubleshooting-github-cloning-issue-ssl-certificate-problem-unable-to-get-local-issuer-certificate</guid><category><![CDATA[GitHub]]></category><category><![CDATA[Git]]></category><dc:creator><![CDATA[Rino Reji Cheriyan]]></dc:creator><pubDate>Wed, 20 Sep 2023 16:11:47 GMT</pubDate><content:encoded><![CDATA[<p>Have you ever encountered an SSL certificate problem when trying to clone a repository from GitHub? The error message might look something like this:</p>
<pre><code class="lang-bash">SSL certificate problem: unable to get <span class="hljs-built_in">local</span> issuer certificate
</code></pre>
<p>This issue can be frustrating, but fear not – there's a simple solution to it. In this blog post, we'll explore the reason behind this problem and the steps to resolve it.</p>
<h2 id="heading-understanding-the-issue"><strong>Understanding the Issue</strong></h2>
<p>The "SSL certificate problem: unable to get local issuer certificate" error occurs when Git, the version control system that underpins GitHub, can't verify the authenticity of the SSL certificate presented by the server. This is a security measure to ensure that you're connecting to the right server and not being intercepted by malicious actors.</p>
<h2 id="heading-the-reason"><strong>The Reason</strong></h2>
<p>One common reason behind this error is that Git is configured to use the OpenSSL SSL backend instead of the Windows certificate store. This means that Git is not utilizing the certificate store that Windows uses to manage SSL certificates.</p>
<p>You can verify your current SSL backend configuration by running the following command:</p>
<pre><code class="lang-bash">git config -l --show-origin
</code></pre>
<p>If you see <code>http.sslBackend</code> set to "openssl", it indicates that Git isn't using the Windows certificate store.</p>
<h2 id="heading-the-solution"><strong>The Solution</strong></h2>
<p>To resolve this SSL certificate problem, you need to switch Git to use the "schannel" SSL backend, which will make it utilize the Windows certificate store. Here's how you can do it:</p>
<ol>
<li><p><strong>Open a terminal or command prompt:</strong> You can use the terminal or command prompt you use for Git commands.</p>
</li>
<li><p><strong>Run the following command:</strong></p>
</li>
</ol>
<pre><code class="lang-bash">git config --global http.sslBackend schannel
</code></pre>
<p>This command sets the global Git configuration to use the "schannel" SSL backend.</p>
<ol>
<li><strong>Try cloning the repository again:</strong> After setting the SSL backend to "schannel" attempt to clone the repository that was giving you the SSL certificate error. It should work without any issues now.</li>
</ol>
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p>Encountering SSL certificate problems when trying to clone a GitHub repository can be frustrating, but understanding the reason behind the issue and knowing how to resolve it can save you time and headaches. By switching Git to use the "schannel" SSL backend, you ensure that it utilizes the Windows certificate store, allowing your stored certificates to be picked up correctly.</p>
<p>Next time you encounter this SSL certificate problem, remember the simple solution: run <code>git config --global http.sslBackend schannel</code>, and you'll be back to cloning repositories without a hitch.</p>
<p>Happy coding! :rocket:</p>
]]></content:encoded></item><item><title><![CDATA[Connect to MySQL server inside a docker from vscode]]></title><description><![CDATA[Useful links
https://hub.docker.com/r/mysql/mysql-server/
https://docs.docker.com/network/
MySQL - Visual Studio Marketplace
Download and run a MySQL Server Docker Image
docker pull mysql/mysql-server
docker run --name=mysql1 -p 3306:3306 -d mysql/my...]]></description><link>https://blog.rinoreji.in/connect-to-mysql-server-inside-a-docker-from-vscode</link><guid isPermaLink="true">https://blog.rinoreji.in/connect-to-mysql-server-inside-a-docker-from-vscode</guid><category><![CDATA[Docker]]></category><category><![CDATA[MySQL]]></category><category><![CDATA[vscode extensions]]></category><category><![CDATA[vscode]]></category><dc:creator><![CDATA[Rino Reji Cheriyan]]></dc:creator><pubDate>Tue, 04 Jul 2023 01:46:27 GMT</pubDate><content:encoded><![CDATA[<p>Useful links</p>
<p><a target="_blank" href="https://hub.docker.com/r/mysql/mysql-server/">https://hub.docker.com/r/mysql/mysql-server/</a></p>
<p><a target="_blank" href="https://docs.docker.com/network/">https://docs.docker.com/network/</a></p>
<p><a target="_blank" href="https://marketplace.visualstudio.com/items?itemName=formulahendry.vscode-mysql">MySQL - Visual Studio Marketplace</a></p>
<h3 id="heading-download-and-run-a-mysql-server-docker-image">Download and run a MySQL Server Docker Image</h3>
<pre><code class="lang-bash">docker pull mysql/mysql-server
docker run --name=mysql1 -p 3306:3306 -d mysql/mysql-server
</code></pre>
<p>Check logs to see the generated root password (look for GENERATED ROOT PASSWORD)</p>
<pre><code class="lang-bash">docker logs mysql1
</code></pre>
<p>Connect to the running server as root user and then create a new user for localhost</p>
<pre><code class="lang-bash">mysql -u root -p

CREATE USER <span class="hljs-string">'sqluser'</span>@<span class="hljs-string">'%'</span> IDENTIFIED 
WITH mysql_native_password BY <span class="hljs-string">'password'</span> ; 

GRANT ALL PRIVILEGES ON *.* TO <span class="hljs-string">'sqluser'</span>@<span class="hljs-string">'%'</span> ;

FLUSH PRIVILEGES;
</code></pre>
<p>Now mysql server is ready to be connected from host machine. I used an extension called '<a target="_blank" href="https://marketplace.visualstudio.com/items?itemName=formulahendry.vscode-mysql"><strong>MySQL</strong></a> <strong>by</strong> <a target="_blank" href="https://marketplace.visualstudio.com/publishers/formulahendry"><strong>Jun Han</strong></a>' in vscode</p>
<ul>
<li><p>To add MySQL connection: in Explorer of VS Code, click "MYSQL" in the bottom left corner, then click the <code>+</code> button, then type host, user, password, port and certificate file path (optional) in the input box.</p>
</li>
<li><p>To run MySQL query, open a SQL file first then:</p>
<ul>
<li><p>right click on the SQL file, then click <code>Run MySQL Query</code> in editor context menu (Note: you could also run the selected SQL query)</p>
</li>
<li><p>or use shortcut <code>Ctrl+Alt+E</code></p>
</li>
<li><p>or press <code>F1</code> and then select/type <code>Run MySQL Query</code></p>
</li>
</ul>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[sp_helptext for viewing definition in SQL Server]]></title><description><![CDATA[In SQL Server, the sp_helptext system stored procedure is a handy tool for the developers to retrieve the definition of SQL Server objects such as stored procedure, views, triggers and user-defined functions. This is much faster than navigating throu...]]></description><link>https://blog.rinoreji.in/sphelptext-for-viewing-definition-in-sql-server</link><guid isPermaLink="true">https://blog.rinoreji.in/sphelptext-for-viewing-definition-in-sql-server</guid><category><![CDATA[SQL Server]]></category><category><![CDATA[chatgpt]]></category><dc:creator><![CDATA[Rino Reji Cheriyan]]></dc:creator><pubDate>Fri, 07 Apr 2023 05:08:19 GMT</pubDate><content:encoded><![CDATA[<p>In SQL Server, the <code>sp_helptext</code> system stored procedure is a handy tool for the developers to retrieve the definition of SQL Server objects such as stored procedure, views, triggers and user-defined functions. This is much faster than navigating through a GUI or other tools. Give it a try</p>
<pre><code class="lang-sql">sp_helptext 'procedure_name'
</code></pre>
<pre><code class="lang-sql"><span class="hljs-keyword">USE</span> AdventureWorks;
GO
sp_helptext 'usp_GetOrders';
</code></pre>
<pre><code class="lang-sql"><span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">PROCEDURE</span> [dbo].[usp_GetOrders]
    @StartDate DATETIME,
    @EndDate DATETIME
<span class="hljs-keyword">AS</span>
<span class="hljs-keyword">BEGIN</span>
    <span class="hljs-keyword">SELECT</span> *
    <span class="hljs-keyword">FROM</span> Sales.SalesOrderHeader
    <span class="hljs-keyword">WHERE</span> OrderDate <span class="hljs-keyword">BETWEEN</span> @StartDate <span class="hljs-keyword">AND</span> @EndDate
<span class="hljs-keyword">END</span>
</code></pre>
]]></content:encoded></item><item><title><![CDATA[Get size of all tables in database]]></title><description><![CDATA[SELECT 
  o.name AS ObjectName, 
  SUM(reserved_page_count) * 8.0 / 1024 AS SizeinMB 
FROM 
  sys.dm_db_partition_stats AS ps 
  INNER JOIN sys.sysobjects AS o ON ps.object_id = o.id 
GROUP BY 
  o.name 
ORDER BY 
  SizeinMB DESC;]]></description><link>https://blog.rinoreji.in/get-size-of-all-tables-in-database</link><guid isPermaLink="true">https://blog.rinoreji.in/get-size-of-all-tables-in-database</guid><category><![CDATA[SQL Server]]></category><dc:creator><![CDATA[Rino Reji Cheriyan]]></dc:creator><pubDate>Thu, 12 Jan 2023 12:11:50 GMT</pubDate><content:encoded><![CDATA[<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> 
  o.name <span class="hljs-keyword">AS</span> ObjectName, 
  <span class="hljs-keyword">SUM</span>(reserved_page_count) * <span class="hljs-number">8.0</span> / <span class="hljs-number">1024</span> <span class="hljs-keyword">AS</span> SizeinMB 
<span class="hljs-keyword">FROM</span> 
  sys.dm_db_partition_stats <span class="hljs-keyword">AS</span> ps 
  <span class="hljs-keyword">INNER</span> <span class="hljs-keyword">JOIN</span> sys.sysobjects <span class="hljs-keyword">AS</span> o <span class="hljs-keyword">ON</span> ps.object_id = o.id 
<span class="hljs-keyword">GROUP</span> <span class="hljs-keyword">BY</span> 
  o.name 
<span class="hljs-keyword">ORDER</span> <span class="hljs-keyword">BY</span> 
  SizeinMB <span class="hljs-keyword">DESC</span>;
</code></pre>
]]></content:encoded></item><item><title><![CDATA[Update angular to latest version]]></title><description><![CDATA[https://update.angular.io/ is a great place to understand and follow for updating angular from one version to a new one, but some time things don't work as expected. for example, when we have a package which doesn't support the latest angular, we get...]]></description><link>https://blog.rinoreji.in/update-angular-to-latest-version</link><guid isPermaLink="true">https://blog.rinoreji.in/update-angular-to-latest-version</guid><category><![CDATA[Angular]]></category><category><![CDATA[npm]]></category><dc:creator><![CDATA[Rino Reji Cheriyan]]></dc:creator><pubDate>Mon, 21 Nov 2022 19:49:06 GMT</pubDate><content:encoded><![CDATA[<p>https://update.angular.io/ is a great place to understand and follow for updating angular from one version to a new one, but some time things don't work as expected. for example, when we have a package which doesn't support the latest angular, we get an exception  </p>
<blockquote>
<p>× Migration failed: Incompatible peer dependencies found.
Peer dependency warnings when installing dependencies means that those dependencies might not work correctly together.
You can use the '--force' option to ignore incompatible peer dependencies and instead address these warnings later.
  See "C:\Users...\angular-errors.log" for further details.</p>
</blockquote>
<p>Below are the steps that I follow which works.
For this example I am mentioning the steps for updating from v12 to v14  </p>
<p><code>npm update</code>  </p>
<p><code>npx  @angular/cli@13 update @angular/core@13 @angular/cli@13 --force</code>  </p>
<p>commit your changes! else on the next update you will get an error  </p>
<blockquote>
<p>Error: Repository is not clean. Please commit or stash any changes before updating.</p>
</blockquote>
<p><code>npx  @angular/cli@14 update @angular/core@14 @angular/cli@14 --force</code>  </p>
<p>commit  again</p>
<p>Now we use <a target="_blank" href="https://www.npmjs.com/package/npm-check-updates">npm-check-updates</a> or <code>npm</code> itself to update all the depend packages which needs to be updated</p>
<p><code>npx npm-check-updates -i</code>
 or
<code>npm install {package-name}@* {save flags?}</code></p>
<p>then </p>
<p><code>npm audit fix</code>  </p>
<p>Now try running your application. <code>npm start</code></p>
<p><em>Happy Coding!</em></p>
<hr />
<p>Some additional commands and reference materials<br /><code>npm clean-install</code> to clear the node_modules folder and install fresh<br /><a target="_blank" href="https://www.freecodecamp.org/news/how-to-update-npm-dependencies/">how-to-update-npm-dependencies</a></p>
]]></content:encoded></item><item><title><![CDATA[A plugin for jSignature to support image from an url]]></title><description><![CDATA[jSignature Draw signature in the browser
jSignature is a JavaScript widget (a jQuery plugin) that simplifies creation of a signature capture field in a browser window, allowing a user to draw a signature using mouse, pen, or finger. By default it sup...]]></description><link>https://blog.rinoreji.in/a-plugin-for-jsignature-to-support-image-from-an-url</link><guid isPermaLink="true">https://blog.rinoreji.in/a-plugin-for-jsignature-to-support-image-from-an-url</guid><dc:creator><![CDATA[Rino Reji Cheriyan]]></dc:creator><pubDate>Tue, 25 Oct 2022 00:00:00 GMT</pubDate><content:encoded><![CDATA[<p><a target="_blank" href="https://willowsystems.github.io/jSignature"><strong>jSignature</strong> Draw signature in the browser</a></p>
<p><strong>jSignature</strong> is a JavaScript widget (a jQuery plugin) that simplifies creation of a signature capture field in a browser window, allowing a user to draw a signature using mouse, pen, or finger. By default it supports data-url-formatted, base64 encoded (likely PNG) bitmap data. Due to this functionality we will need to enable <code>data:</code> for <code>img-src</code> in applications csp setting, which is not a great thing. In this post we will see how to develop an import plugin for jSignature which can support signature data as urls and in turn make csp scrict (<code>img-src 'self';</code>). This post will also help you to extent the inbuilt functionality of jSignature.</p>
<pre><code class="lang-js:image-url-plugin.js">$(function () {
    var mothership = $.fn['jSignature']
    mothership(
        'addPlugin'
        , 'import'
        , 'image-url' // alias
        , function (imgUrl, formattype, rerendercallable) {
            var img = new Image()
                // this = Canvas DOM elem. Not jQuery object. Not Canvas's parent div.
                , c = this

            img.onload = function () {
                var ctx = c.getContext("2d").drawImage(
                    img, 0, 0
                    , (img.width &lt; c.width) ? img.width : c.width
                    , (img.height &lt; c.height) ? img.height : c.height
                )
            }
            img.src = imgUrl
        }
    )
});
</code></pre>
<p>And now we can use the plugins functionality by specifying the alias on <code>importData</code></p>
<pre><code class="lang-js"><span class="hljs-keyword">let</span> signData = <span class="hljs-string">'https://example.com/getsignature?id=1'</span>
$(<span class="hljs-string">'#signatureElementId'</span>).jSignature(<span class="hljs-string">'importData'</span>, signData, <span class="hljs-string">'image-url'</span>)
</code></pre>
<p>References:</p>
<ul>
<li><a target="_blank" href="https://willowsystems.github.io/jSignature/#/about/">jSignature home page</a></li>
<li><a target="_blank" href="https://github.com/willowsystems/jSignature/tree/master/src/plugins">Plugin samples</a></li>
</ul>
]]></content:encoded></item><item><title><![CDATA[C# ?? "null coalescing operator"]]></title><description><![CDATA[The null-coalescing operator ?? returns the value of its left-hand operand if it isn't null; otherwise, it evaluates the right-hand operand and returns its result. The ?? operator doesn't evaluate its right-hand operand if the left-hand operand evalu...]]></description><link>https://blog.rinoreji.in/c-null-coalescing-operator</link><guid isPermaLink="true">https://blog.rinoreji.in/c-null-coalescing-operator</guid><dc:creator><![CDATA[Rino Reji Cheriyan]]></dc:creator><pubDate>Sat, 03 Dec 2011 00:00:00 GMT</pubDate><content:encoded><![CDATA[<p>The null-coalescing operator <code>??</code> returns the value of its left-hand operand if it isn't null; otherwise, it evaluates the right-hand operand and returns its result. The <code>??</code> operator doesn't evaluate its right-hand operand if the left-hand operand evaluates to non-null.</p>
<pre><code class="lang-csharp"><span class="hljs-keyword">string</span> message = <span class="hljs-string">"hello world"</span>;
<span class="hljs-keyword">string</span> result = message ?? <span class="hljs-string">"It was null"</span>;
<span class="hljs-comment">//result == "hello world";</span>

<span class="hljs-keyword">string</span> message = <span class="hljs-literal">null</span>;
<span class="hljs-keyword">string</span> result = message ?? <span class="hljs-string">"It was null"</span>;
<span class="hljs-comment">//result == "It was null";</span>
</code></pre>
<p>Thanks to <a target="_blank" href="https://weblogs.asp.net/scottgu/the-new-c-null-coalescing-operator-and-using-it-with-linq">Scott Guthrie</a></p>
]]></content:encoded></item><item><title><![CDATA[String to Byte Array]]></title><description><![CDATA[String to byte[]A simple code to convert a string to byte array
UTF8Encoding encoding = new UTF8Encoding();
return encoding.GetBytes("My string to convert!");]]></description><link>https://blog.rinoreji.in/string-to-byte-array</link><guid isPermaLink="true">https://blog.rinoreji.in/string-to-byte-array</guid><dc:creator><![CDATA[Rino Reji Cheriyan]]></dc:creator><pubDate>Sun, 03 Jul 2011 00:00:00 GMT</pubDate><content:encoded><![CDATA[<p>String to byte[]<br />A simple code to convert a string to byte array</p>
<pre><code class="lang-csharp">UTF8Encoding encoding = <span class="hljs-keyword">new</span> UTF8Encoding();
<span class="hljs-keyword">return</span> encoding.GetBytes(<span class="hljs-string">"My string to convert!"</span>);
</code></pre>
]]></content:encoded></item></channel></rss>