Posts

Custom Modification in Wikipedia to Make Each Sentence Starts at New Line

Image
Previously, I posted article about having each new sentence starts at new line increase readability . We can also make Wikipedia pages to be that way for both desktop and mobile mode, as seen in screenshots below, by adding custom Javascript in user preference setting. You will need to create Wikipedia username and login using that username to be able to store the custom Javascript. I will also add steps to enable Dark mode and change font color to Red Orange to further enhance readability. Sample screenshots comparison between default and new-lines pages using Wikipedia page https://en.wikipedia.org/wiki/Tensor_(machine_learning) New-lined Mobile Mode     Default Mobile Mode New-lined Desktop Mode Default Desktop Mode Configuration Steps: Open Wikipedia, login then open User Preferences page: Put code below into Custom Javascript . It ad...

High Performance Linux Kernel 6.12 LTS for Hyper-V

Image
I made this high performance Linux Kernel 6.12 LTS for Hyper-V for my self learning lab. Why Hyper-V? Because it's availabe for free in Windows Pro since 8.1 Pro. It is also Type 1 hypervisor, similar to VMware ESX or KVM, so it's much more faster than Type 2 hypervisor such as VMWare Workstation or VirtualBox. It boots in 6 seconds and whole OS needs less than 400MB of RAM. The kernel config is based on latest Oracle UEK8 kernel configuration that is applied to kernel 6.12 LTS. The high performance is gained by enabling and disabling some kernel options/components: Enabled: Hyper-V DRM, instead of Hyper-V framebuffer; AES-NI and AVX hardware accelerated encryption method as built-in, not module; etc. Disabled: 32 bit support; non AMD cpu (I compiled this kernel using native flag in AMD Zen4); Virtualization host; Many physical hardware drivers; NVME; KVM; Xen; Vmware; ACPI thermal, CPU frequency, power supply; Linux security models (SELinux, AppArmor, etc....

Microsoft Word Macro to Maximize Picture Size to Page Width

Image
The Microsoft Word macro below will maximize picture size by resetting it to its original size. If the original size is larger than page width and height, it will reduce it accordingly. To create the macro, open View ribbon in Microsoft Word then click Macro > View Macro . Type MaxPictureSize in Macro Name then click Create . Enter the macro code text below into the editor then Save and close the macro editor window. Sub MaxPictureSize() Selection.ShapeRange.WrapFormat.Type = wdWrapInline Selection.ClearFormatting With Selection.PageSetup Xvar = .PageWidth - .LeftMargin - .RightMargin Yvar = .PageHeight - .TopMargin - .BottomMargin End With With Selection.InlineShapes(1) .ScaleWidth = 100 .ScaleHeight = 100 .LockAspectRatio = msoTrue If (.Width > Xvar) Then .Width = Xvar End If If (.Height > Yvar) Then .Height = Yvar End If End With End Sub After then, create shortcut button to the macro by customizing Ribbon.

Microsoft Word Macro to Tidy Up All Tables

Image
Microsoft Word has capability to automatically arrange table's row width and column height. The reformatted tables are simply better than manual arrangement and it works on tables containing merged columns. I created Word macro below that will automatically reformat all tables in single macro execution. It resizes all cells' width and height to fit the content so the table takes least vertical space while maximizing available horizontal space. This makes the table contents are easier to be read. To create the macro, open View ribbon in Microsoft Word then click Macro > View Macro . Type TidyTable in Macro Name then click Create . Enter the macro code text below into the editor then Save and close the macro editor window. Sub TidyTable() Options.ReplaceSelection = True For Each aTable In ActiveDocument.Tables With aTable .TopPadding = InchesToPoints(0) .BottomPadding = InchesToPoints(0) .LeftPadding = InchesToPoints(0.03) .RightP...

New Line for Every Sentence

Image
We are accustomed to write multiple sentences in paragraph without changing to new line and use new line only for changing to new paragraph. However, it is much easier to read new sentence from start of line. As seen in pictures below, writings that all of its sentences start in new lines are easier to be read, especially in narrow smartphone's portrait mode. To separate paragraphs, we simply use 2 new lines instead of usual 1 new line. Nowadays, everything is online and mostly we no longer write or print on paper. So, there is no economic reason of saving paper to limit new lines only for changing paragraphs. Make your writing more readable by simply putting new line between sentences. This mechanism can also be done in Microsoft by using Shift-Enter to create new line within same paragraph. Word's terminology for this kind of break is Manual Line Break while regular Enter will create paragraph character. Other implementation in Wikipedia and L...

Single Keyboard Shortcut to Minimize Application Windows then Lock & Turn off Screen

Image
I make Windows desktop shortcut that minimize all windows then lock and turn off screen by single press of Ctrl-Alt-L keys. This is improvement over regular Windows-L shortcut that only locks screen. Turning off the screen definitely saves power consumption. Minimizing application windows also can save CPU and memory utilization in some programs. It does not need third party software and works without administrative priviledge. You only need to create text-based DOS-style batch file, make shortcut in Desktop into it then assign keyboard sequence for it. 1. Create DOS-style Batch File Using text editor, such as Notepad, create text file, e.g. lockscreen.bat , containing texts below. I suggest to store it in locally mapped cloud drive, e.g. Onedrive, so you can use same file for multiple Windows PCs. REM ##################################################### REM Lock screen: c:\windows\system32\RunDll32.exe user32.dll,LockWorkStation REM Minimize all aplication windo...

Free, Fast and Secure Linux Remote Desktop using X2GO

Image
I deployed Linux based X2GO remote desktop server for vendor access that works in low bandwidth, allows vendor to upload files but not to download file, and also only allows 1-way clipboard transfer from client to server. Such remote desktop capability is needed because some management tools are graphical applications, e.g. web based configuration tool. Regular VPN can provide the connectivity but giving VPN access directly to vendor server will allow them to download data easily. This situation violates data privacy regulations in many countries which requires company to prevent leaks of customer data. Using Microsoft Windows based platform is not an option as it will need Microsoft RDS/VDA license for every user. Regular remote X Window is also not acceptable due to high bandwith requirement. I tried several low bandwidth Linux based remote dekstop platforms, e.g. XVNC, XRDP and non-free NoMachine, but X2GO is the best for my need. X2GO works by compression remote ...

DRM Shaka Player UI Demo

Shaka Player documentation: https://shaka-player-demo.appspot.com/docs/api/index.html Media URL (MPEG-DASH *.mpd or HLS *.m3u8): Subtitle: DRM Type & License URL: Apple Fairplay Google Widevine Microsoft Playready W3C Clear Key NO DRM

DRM Shaka Player Demo

Shaka Player documentation: https://shaka-player-demo.appspot.com/docs/api/index.html Media URL (MPEG-DASH *.mpd or HLS *.m3u8): Subtitle: DRM Type & License URL: Apple Fairplay Google Widevine Microsoft Playready W3C Clear Key NO DRM

Cast M3U to Chromecast

Enter local file or URL to .m3u file: Local File URL NO_DISPLAY .

Whatsapp Locator Demo

This is demo of workaround for Whatsapp Business API to get customer's current location in one-time-only mode. The method is explained in IN THIS LINK . Please allow location access. This will active once only.

Workaround for Whatsapp Business API-based Application to Get Customer’s Current Location in One-Time-Only Manner

Image
Note: Meta now provides built in mechanism for user's location request (likely since Q1 2023) in this API documention Whatsapp Business API is usually used by business organizations or companies to communicate with their customers. In some cases, the company’s application server, e.g. CRM application, might need to know customer’s current location. However, Whatsapp API doesn’t provide such information, except if customer shares his/her live location which most customers will not going to do. Meanwhile, most CRM applications actually only needs customer’s location in one-time-only manner. We know that Internet browser can capture user’s location with user consent. So, the workaround is basically asking customer to open webpage which its Javascript will capture customer’s current location and send it to company’s application server. This is the flow of the basic functionality: SVG File whatsapplocator.svg The demo of explained method can be accessed IN THIS LIN...

Convert Phone Number to Whatsapp Link

Image
Type the phone number below: + Create Whatsapp Link Clear Whatsapp Link: https://api.whatsapp.com/send?phone=621234