• aerial photography of water beside forest during golden hour
    General

    Install PM2 in AWS LightSail, EC2

    Install PM2 globally. This is the first step. Execute below commands in AWS terminal. Make PM2 run during startup. This will daemonize pm2 and initialize it on system reboots. This step is very important. This will automatically start pm2 in case we restart our server instance. PM2 commands

  • General

    Upgrade NodeJS in AWS LightSail

    We will discuss how to upgrade NodeJS version in an Amazon LightSail instance. SSH into your AWS LightSail instance. Get the current NodeJS version First get the NodeJS version and where its installed. The above command will display the currently installed node version. Now get the where Node JS is installed This will display the node location. We need this later. Update Package Lists Before installing a new version of Node.js, it’s a good practice to update your package lists. Download and Install Node.js We will install the node version 20.0.1. Change this to version of your choice. The below example commands will be using version 20.0.1 Create a folder…

  • General

    WordPress malware ch.trainresistor.cc

    Issue: WordPress site is not loading properly. Styles are not loading in the page. All requested are redirecting to an external URL ch.trainresistor.cc Cause: This is due to a vulnerabilty in a the wordpress plugin – “PublishPress Capabilities – User Role Access, Editor Permissions, Admin” More info on this here Resolution: This malware affects files and database. Search for trainresistor in your PHP files contents. Replace it with your site URL. Open the database using phpMyAdmin from your server control panel. Select your site database and then select wp_options table. Update the fields siteurl and admin_email to your website url and admin email. See below image After this open your…

  • General

    View WIFI password from command prompt

    Have you forgot your wifi password. You can view it from your command prompt if you know the wifi name. Open command prompt, type below command and press enter key. netsh wlan show profile YOUR-WIFI-NAME key=clear This will show the WIFI details along with the password.

  • Design,  General

    5 design resources for illustrations

    These are the 5 design resources I mainly use. 1. humaaans Website: https://www.humaaans.com/ License : CC – Free for commercial or personal use As the website name says, the illustrations are mostly related to humans. You can download the assets in png, svg, sketch formats Download formats: png, svg, sketch 2. Undraw Website : https://undraw.co/ License: Free to use for personal and commercial projects, without the need to include attribution. Even though its free, whenever possible give credits to the designer/developer. These things needs time and effort. Download formats: svg, png 3. Pixabay One of the best sites for free vectors and png files Website: https://pixabay.com/ License: mostly Pixabay License…

  • General

    GetSpriteXY

    I was working with some css sprites in a project. There was sprite with lot of small icons. It was difficult finding the position of icons inside the sprite. I used to open the sprite in Photoshop and find the X and Y position of the icon needed. And this position was used in the CSS class. To make the process simpler a tool was created where you can upload the sprite and using mouse draw a box around the icon. The tool will generate the CSS style for you. Please check it at https://getspritexy.netlify.com/ The source is available in GitHub, fork/clone and play with it

  • General

    Remove map files in React CRA

    Map files are generated by default when you do a build using webpack.If you don’t want .map files in your build you can do the below steps. Create a new .env in your project root (don’t put it in src folder) Add GENERATE_SOURCEMAP=false in your .env file Execute command npm run build, this should build files without any map files. Your .env file will look like this.

  • General

    First computer

    This was my first computer, way back in early 90’s. This does’nt had any monitor, it was connect to our television (the big fat CRT television) Used to do programming in BASIC and played some games. Did lot of small programs in BASIC. The source was lost somewhere as there were no much storage devices at that time.