Setup Development Workspace in WSL2

WSL2 was released yesterday along with Windows10 May 2020 update (v2004). WSL2 enables to work with Linux kernels within Windows, and it brings some crazy possibilities for those of us who refuse to dual boot or switch over completely to Linux. I am assuming that you already have installed Windows v2004 through the normal Windows update channel, or through the update assistant. Once you are on Windows10 2004, here’s how you can setup a cool WSL2 development environment. ...

Install Scoop for Command-line Nirvana

Command line in Windows. You love it when there are Powershell, Cmder and friends. And, you hate it when you cannot install simple programs quickly. Well, hate may be a strong word - but you get the gist. I have tried chocolatey and have a like-dislike relationship with that program. I have also experimented with VMs and anything that exposes more of the command line. None of the programs stuck in my day-to-day flow. For a few projects, I dedicatedly use WSL - but could not quite switch over everywhere. ...

Can a clipboard editor save the day?

A clipboard editor of all the things? How can it be useful in this day and age? I have tried to automate some of the most common things that I do on a regular basis. There are a bunch of tools that I use to do just that - these save keystrokes (AutoHotkey), automate regular tasks (e.g. take a screenshot, optimize size and upload to imgur), or connect my one useless social media account to the other (IFTTT). ...

Spin up your own local GraphQL server within 15 min

Create your own GraphQL APIs in 15 min flat using Postgres database and a bit of help from PostGraphile. No GraphQL server configuration needed. No frontend beginner developer ever said - “I want to play around with servers to understand their internals byheart before I venture forth with my beautiful Vue application”. If you are building on REST APIs, you have public services like JSONPlaceholder. These services provide quick access to much loved sample APIs for to-do, posts, users etc. ...

Optimize Images for Web

I had been a big user of SmushIt! Wordpress plugin in its heyday. After slowing down my sites too often, I switched to offline solutions. None of the tools I used have been as easy to use as FileOptimizer. Also: find this handy download link. FileOptimizer is a free, open-source tool to optimize files. It is in fact a wrapper for a bunch of open source tools that work great individually, but absolutely rock as a collection. ...

The Right WSL Setup for using Node

A few node packages have been causing me pain lately. Who knew that my Windows 10 addiction can get me into trouble with node? There are, of course, multiple ways to solve the node problem on Windows. Do not use the offending package :). If there is no support for Windows, your great program does not get written using the specific package. Hell, yeah. Use NVM to juggle between node versions and check whether the problem goes away. I did something similar when using strapi-js. I could not get it to work on Node 10 or 11. ...

Test SMTP from Windows Command Line

The first thing you want to do when you setup SMTP server is to test it. (yep, I consider myself smart). When the SMTP server setup was ‘once in a blue moon’ process, I could afford to just set up the client through the local Outlook or any other mail client, through Gmail and such. The task became a chore if you had to setup SMTP on all new applications, and had to be repeated twice every month. The fact that not all SMTP servers are the same and cannot be tamed by me in one go - just adds to the fun. ...

Fish - Super Shell for Windows

I have been a Powershell user since it was released in Windows 10. But, I had been switching between Powershell and Linux Bash - just so I can. Fish changed the world for me. It is unbelievable that I did not quite know Fish until late of Y2018. One of the positives of seeing a lot of developer videos is learning how other developers work. In one of those videos, the shell had some crazy colors and auto-completing like nobody’s business. I attributed that to Mac at that time, but some lazy browsing led me to the Fish shell. ...

Command Line Tools for Windows

The humble ‘cmd’ in Windows is good enough, but who ever can be satisfied with stuff that is ‘good enough’? tl;dr: Use cmder I am a Windows guy through and through, but had been an active user of Linux on my main desktop and servers. While servers are largely managed through SSH or even CPANEL today, I switched to Windows only after experiencing multiple issues with boot loaders. It also helped that most of the programs I used were on Windows - thanks to my day job. ...

NPM Install mysql errors in Windows

Have you used npm install to get mysql package? npm i --save mysql It is quite common to see the below error on Windows: c:\dev\proj\js\adonis\hwblog2>npm i --save mysql adonis-fullstack-app@4.1.0 c:\dev\proj\js\adonis\hwblog2 `-- sqlstring@2.3.1 extraneous npm ERR! Windows_NT 10.0.17134 npm ERR! argv "C:\\dev\\js\\nodejs\\node.exe" "C:\\Users\\itsme\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "i" "--save" "mysql" npm ERR! node v10.11.0 npm ERR! npm v3.9.5 npm ERR! path c:\dev\proj\js\adonis\hwblog2\node_modules\.staging\bignumber.js-1aa9aeba npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall rename npm ERR! Error: EPERM: operation not permitted, rename 'c:\dev\proj\js\adonis\hwblog2\node_modules\.staging\bignumber.js-1aa9aeba' -> 'c:\dev\proj\js\adonis\hwblog2\node_modules\bignumber.js' npm ERR! at destStatted (C:\Users\itsme\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:25:7) npm ERR! at FSReqWrap.oncomplete (fs.js:154:21) npm ERR! npm ERR! Error: EPERM: operation not permitted, rename 'c:\dev\proj\js\adonis\hwblog2\node_modules\.staging\bignumber.js-1aa9aeba' -> 'c:\dev\proj\js\adonis\hwblog2\node_modules\bignumber.js' npm ERR! { Error: EPERM: operation not permitted, rename 'c:\dev\proj\js\adonis\hwblog2\node_modules\.staging\bignumber.js-1aa9aeba' -> 'c:\dev\proj\js\adonis\hwblog2\node_modules\bignumber.js' npm ERR! at destStatted (C:\Users\itsme\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:25:7) npm ERR! at FSReqWrap.oncomplete (fs.js:154:21) npm ERR! npm ERR! Error: EPERM: operation not permitted, rename 'c:\dev\proj\js\adonis\hwblog2\node_modules\.staging\bignumber.js-1aa9aeba' -> 'c:\dev\proj\js\adonis\hwblog2\node_modules\bignumber.js' parent: 'adonis-fullstack-app' } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! Please include the following file with any support request: npm ERR! c:\dev\proj\js\adonis\hwblog2\npm-debug.log The above error is caused when trying to install mysql package for AdonisJS app, but the error itself is universal on Windows 10. ...