AMD vs ARM

ARM vs AMD When downloading Hugo. It gives the binary which we can place in PATH. This binary comes in 2 flavours for Windows: ARM AMD How to find your Windows Hardware is AMD or ARM …so that you can download the correct binary? Turns out its very simple: D:\mywork>echo %PROCESSOR_ARCHITECTURE% AMD64 D:\mywork>

October 22, 2022 · 1 min · Anant

CSRF basics

Also called CSRF / XSRF (Cross Site Request Forgery) When a malicious site can cause a visitor’s browser to make a request to your server that causes a change on server. The server thinks that because the request comes with the user’s cookies, the user wanted to submit that form. On every request to a site A, from browser, the browser includes automatically the cookies that came from Site A....

September 24, 2022 · 1 min · Anant

Running shell commands from a Node application

Running shell commands in your node application: Found great explanation here, The Child Process Module When we execute shell commands, we are running code outside of our Node.js application. In order to do this, we need to run these commands in a child process. A child process is code that is run in a different thread (and process id) outside your Node.js application. However, we can still send and receive information from the child process using standard I/O streams....

September 15, 2022 · 2 min · Anant

Git - Update Local Branch With Clean Copy of Remote branch

How to update 1 branch local (say A) - to match exactly the remote branch A If you have any commits made locally, remove them - match the remote branch A. Any untracked files also remove. develop branch is an example case of A - I always try to keep my local develop branch matching to remote because I never do commits directly to develop branch locally apart from updating local develop to match remote develop....

July 12, 2022 · 1 min · Anant

Quickly check - Disk Size on your Windows machine

Apart from diskmgmt.msc On cmd: wmic diskdrive get size C:\Users\Anant>wmic diskdrive get size Size 256052966400 Above shows ~ 256 GB 256,052,966,400 Same on diskmgnt.msc :

June 29, 2022 · 1 min · Anant