Thursday, August 26, 2021

Cannot call a javascript function from HTML file in codesandbox.io. ??!!!


I was a bit surprised to see that you cannot reference a javascript function using a Vanilla sandbox using codesandbox.io site. Upon googling a bit here is what I found:

 https://github.com/codesandbox/codesandbox-client/issues/1502 

Here is the working sandbox where we can call a javascript function from an HTML file.

https://codesandbox.io/s/sleepy-sunset-w0wds?file=/src/index.js

Here is the explanation provided by the codesandbox.io folks on it:

k, so the explanation is that in the vanilla template / parcel environment we're doing module bundling, handling src/index.js as a module. Because modules are evaluated in their own (private) scope, if you want to access from html something inside the module, you can put it on the browser's global scope, which is window.

Alternatively, you can use the static template / environment, where we don't do any bundling, like https://codesandbox.io/s/quirky-flower-rm20y (but then you lose the ability to require / import).


Friday, June 25, 2021

[MacOS BigSur 11.4] Issue with Pulse Secure client on Apple Silicon based macbook M1 laptop


 If you happen to buy or get your hands on the Apple Macbook Pro M1 or Macbook Air M1 based on the Apple M1 silicon chip there are a few things that might be helpful if you need to connect to your corporate VPN network using Pulse Secure application.

In my case, I did have my initial doubts if the pulse secure app will work successfully or not. My doubt turned out to be true and it did not work correctly out of the box.

If you download the Intel-based Pulse Secure version 9.1.9  application from Pulse secure website or from your company website, the application will not be able to successfully connect to your corporate network.

It will time out with a network error!! Googled out a bit & to my luck found this community post from Pulse Secure community website https://community.pulsesecure.net/t5/Pulse-Connect-Secure/PSAL-failed-to-Launch-Java-Applet-MacOS-Catalina-10-15-4/m-p/45177/highlight/true#M28690 

It turned out that you will need to install Oracle Java 25 from here https://javadl.oracle.com/webapps/download/AutoDL?BundleId=244576_d7fc238d0cbf4b0dac67be84580cfb4b and then restart Pulse Secure 9.1.9 and continue to connect to your corporate network connection URL & this time it should connect successfully once the SSO login with your corporate credentials works successfully. 



Friday, May 21, 2021

How to install touchpad driver for HP laptops to enable finger swipe gestures and bitlocker recovery

If your HP laptop has a precision touchpad functionality but the finger swipe gestures such as 2 finger scroll up down or th 3 finger app switching are not working, follow the below steps:

1. Visit the below HP official website and select the appropriate laptop model

https://support.hp.com/in-en/drivers/selfservice/hp-elitebook-840-g5-notebook-pc/8491271 






2. Navigate to the above driver selection at Driver-Keyboard, Mouse and Input Devices & hit the download button for the Synaptics Touch fingerprint driver. Install the driver and restart your laptop.

3. In case your Windows Operating system disk drives are bitlocker encrypted, you will reach the bitlocker recovery screen since the driver configuration of your system has changed. DO NOT PANIC !! Visit the custom URL seen on your laptop screen to access the recovery key for your laptop in the Microsoft site custom URL. Enter the recovery key and you should be able to successfully log in to your Windows desktop console.


Notice that the finger swipe gestures are now functional.

4. Configure the Precision Touchpad as per your preference here:



More details about bitlocker recovery  

https://docs.microsoft.com/en-us/windows/security/information-protection/bitlocker/bitlocker-recovery-guide-plan 

Monday, May 17, 2021

Some useful terminologies related to rendering on the web

 Rendering

  • SSR: Server-Side Rendering - rendering a client-side or universal app to HTML on the server.
  • CSR: Client-Side Rendering - rendering an app in a browser, generally using the DOM.
  • Rehydration: “booting up” JavaScript views on the client such that they reuse the server-rendered HTML’s DOM tree and data.
  • Prerendering: running a client-side application at build time to capture its initial state as static HTML.

Performance

  • TTFB: Time to First Byte - seen as the time between clicking a link and the first bit of content coming in.
  • FP: First Paint - the first time any pixel gets becomes visible to the user.
  • FCP: First Contentful Paint - the time when requested content (article body, etc) becomes visible.
  • TTI: Time To Interactive - the time at which a page becomes interactive (events wired up, etc).

Reference: developers.google.com

Tuesday, May 4, 2021

How to change the default pdf viewer application in your Mac or MacBook

 To set a PDF viewer as the default on Mac OS X:

  1. Select any PDF file from Finder. Control-click to open the menu. ... 
  2. Choose Get Info from the menu that opens. ... 
  3. From the Open with: section in the new window that opens, select your preferred application, such as Adobe Reader or Preview. ... 
  4. Click the Change All button.

Sunday, March 28, 2021

How to set up networking between VM and host system

Here is a very useful link which describes well about this topic

https://www.slideshare.net/powerhan96/networking-between-host-and-guest-v-ms-in-virtual-box 

Benq 3d Projector MX525 with Sony HT Blu-ray E3200 - Watching Avatar 3D & Titanic 3D



My idea of watching movies has always been on a big gigantic screen ever since my childhood. I cherish the 3d movies watched on the silver screen theatres starting right from the vintage Chota Chetan till the recent Avengers End Game! 

My setup details

With the pandemic striking in 2020 it has become a distant dream to watch these 3d movies again in theatres. Thankfully I have my Benq 3D projector MX525 to the rescue. My Benq 3D projector MX525 (Cost around Rs 30K) in combination with my Sony 3D Blu-ray home theatre BDV-E3200 (Cost 30K) creates the magic of the large theatre-like vision and the high fidelity sound output. The magic of the 3D is witnessed through the DLP 3D glasses from Hi-Shock/IT-Hub India(Cost Rs 2500 per pair). The 5x5 ft projector screen that I am using is from a company called Logic which cost me around 4K bought from SP road in Bangalore. The overall cost of the setup is about Rs 72,000/- 



A word about Avatar

The movie which brought 3D to the forefront is none other than James Camaron's Avatar. The theatres worldwide were equipped with capabilities to screen 3D films and the excitement among the film buffs was immense since this movie was coming from the director of the epic movie Titanic (1997). The story and screenplay of this film were exemplary as it was an expression about warning people about global warming. 3D and the brand James Cameron further catapulted the popularity of this film many folds. Arguably Avatar still remains as the best film ever shot with such depth and pop-out 3D ever used so creatively in a feature film. The film was a witness to technical brilliance and how Computer Graphics animation can be used to transform a film into a mega marvel saga.


A word about Titanic 3D
The film Titanic was originally not released in 1997 as the Technology to film 3D films was almost non-existent at that time. A 2012 3D re-release was created by re-mastering the original to 4K resolution and post-converting to stereoscopic 3D format. The Titanic 3D version took 60 weeks and $18 million to produce, including the 4K restoration. For the 3D release, Cameron opened up the Super 35 film and expanded the image of the film into a new aspect ratio, from 2.35:1 to 1.78:1, allowing the viewer to see more image on the top and bottom of the screen.




Some of the other 3D films in Blu-Ray format which I own are as below:
1. Avatar
2. Titanic
3. Avengers
4. Life of Pie
5. The Jungle Book
6. Journey into a mysterious Island
7. Gravity


I made a video about the same projector a few years back which is now the most viewed video on my channel with ~30K views.











Friday, March 19, 2021

Why is ifconfig command missing in Debian Linux?

The ifconfig command has been deprecated and thus missing by default on Debian Linux 10.

# ifconfig
-bash: ifconfig: command not found

The new and recommended alternative for examining a network configuration on Debian Linux is ip command. For example to use ip command to display a network configuration run the following:

# ip address

The above ip command can be abbreviated to:

# ip a


If you still prefer to use ifconfig as part of your daily sys admin routine, you can easily install it as part of the net-tools package.

Requirements

Privileged access to your Debian Linux system is required.

Thursday, March 18, 2021

Guiding Principle of Architecture

 Guiding Principle of Architecture 

You don't start trying to build a car, you start by looking at the problem; wanting to get from A-B easier. 

The quickest way to do this is to slap some wheels to a board and make a basic skateboard, it helps you solve the problem quickly and satisfy your customer, after which you can iterate. 






Saturday, March 6, 2021

How to fix the "Program error" in adobe Photoshop 2021 on Windows 10


 If you are facing an error in Adobe Photoshop 2021 on Windows 10 as seen in the below screenshot which says The request could not be completed because of a program error.




Watch the video to know how to fix this error !!


Wednesday, February 3, 2021

Hack for knowing your forgotten wifi password on your Windows PC/laptop

If you want to find out the password of your wifi connection connected to the internet in your system, type the below command in the command prompt and check the value of the property "Key content" !!

Voilaa... Your wifi password is now shown up on the response on the CLI on your windows PC/laptop screen :)

Disclaimer: Use it to find out the forgotten password of your own internet connection. Do not use it to hack into somebody else's wifi connection :D

C:\>netsh wlan show profile name=<wifi-name> key=clear


Profile <wifi-name> on interface Wi-Fi:

=======================================================================


Applied: All User Profile


Profile information

-------------------

    Version                : 1

    Type                   : Wireless LAN

    Name                   : <wifi-name>

    Control options        :

        Connection mode    : Connect automatically

        Network broadcast  : Connect only if this network is broadcasting

        AutoSwitch         : Do not switch to other networks

        MAC Randomization  : Disabled


Connectivity settings

---------------------

    Number of SSIDs        : 1

    SSID name              : "wifi-name"

    Network type           : Infrastructure

    Radio type             : [ Any Radio Type ]

    Vendor extension          : Not present


Security settings

-----------------

    Authentication         : WPA2-Personal

    Cipher                 : CCMP

    Authentication         : WPA2-Personal

    Cipher                 : GCMP

    Security key           : Present

    Key Content            : <password in clear text>


Cost settings

-------------

    Cost                   : Unrestricted

    Congested              : No

    Approaching Data Limit : No

    Over Data Limit        : No

    Roaming                : No

    Cost Source            : Default


Wednesday, January 13, 2021

How to delete an already created multichain?

Here is how you can delete an already created multichain.

 multichain-cli chain1 stop

rm -r ~/.multichain/chain1

You need to do this on every node that was connected.

Featured

TechBytes on Linux

This is a growing list of Linux commands which might come handy for the of Linux users. 1. Found out i had to set the date like this: ...

Popular Posts