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: ...

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.

Popular Posts