Posts

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