Tag Cloud

Sunday, March 08, 2026

Move reload buton in tab context menu to the top for Firefox

In userChrome.css

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */

#context-reload{ -moz-box-ordinal-group: 0 !important; }

Tuesday, February 11, 2025

Google Gemini response: Converting webp to TGS (Telegram sticker)

You're right! My apologies, I seem to have gotten stuck on the idea of *static* WEBP.

Even if your WEBP is animated, it still won't be directly usable as a Telegram animated sticker in the TGS format. Here's why:

* Different animation encoding: Animated WEBPs and the TGS format use different methods for storing animation data. TGS relies on the specific structure and data exported by the Bodymovin-TG plugin from After Effects.

* Telegram's requirements: Telegram's sticker system is designed to work with the TGS format for animated stickers. It's not set up to interpret the animation data within an animated WEBP.

So, what can you do with your animated WEBP?

1. Convert to a different format: You could use online tools like Ezgif to convert your animated WEBP to a GIF or MP4 format. These formats might be suitable for sharing in chats or other platforms, but they won't work for Telegram animated stickers.

2. Recreate the animation in After Effects: If you have the original animation assets, the best approach would be to recreate the animation in After Effects and then export it as a TGS file using the Bodymovin-TG plugin. This will ensure that the animation is in the correct format for Telegram.

Key takeaway: Even with an animated WEBP, you'll still need to go through the After Effects and Bodymovin-TG process to create a Telegram-compatible TGS file.

---

You're absolutely right. It's not possible to directly use an animated WEBP as a Telegram animated sticker without a significant amount of rework.

The core issue is the difference in how animation data is stored. Animated WEBPs and TGS files are structured differently. Telegram's system requires the specific output of the Bodymovin-TG plugin for After Effects to create valid TGS files.

So, while it's frustrating to have to essentially recreate your animation, there's no easy workaround. It's a limitation of Telegram's sticker system and how it handles animated content.

It's understandable to feel that it's tedious, and it's definitely not the ideal workflow. Hopefully, Telegram might introduce more flexible formats in the future, but for now, the After Effects/Bodymovin-TG route is the only reliable way to get animated stickers onto the platform.

In a nutshell: animated stickers from whatsapp cannot be easily ported to telegram.

Tuesday, February 04, 2025

Google Gemini Assist: Create a Firefox toggle (launch/quit) button using AutoHotkey

A workaround to creating a toolbar button to quit Firefox.

Welcome file

Let’s review the process of creating a Firefox toggle (launch/quit) button using AutoHotkey, step by step:

1. Install AutoHotkey:

  • If you don’t have AutoHotkey installed, download it from the official website: https://www.autohotkey.com/
  • Install AutoHotkey, following the on-screen instructions.

2. Create the AutoHotkey Script:

  • Open a plain text editor (like Notepad, Notepad++, or any code editor).
  • Copy and paste the following code into the editor:
#NoEnv  ; Recommended for clarity and consistency
SendMode Input  ; Recommended for reliability
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory

; Check if Firefox is running
IfWinExist, ahk_exe firefox.exe
{
    ; Firefox is running: Quit Firefox
    WinActivate, ahk_exe firefox.exe ; Activate a Firefox window (important!)
    Send ^+q ; Send Ctrl+Shift+Q
}
Else
{
    ; Firefox is NOT running: Launch Firefox
    Run, "C:\Program Files\Mozilla Firefox\firefox.exe" ; Replace with your Firefox path
}

return
  • Crucially: Replace "C:\Program Files\Mozilla Firefox\firefox.exe" with the actual path to your Firefox executable. You can find this by right-clicking the Firefox shortcut on your desktop or Start Menu and selecting “Properties.” The path is in the “Target” field.

  • Save the file with a .ahk extension (e.g., firefox_toggle.ahk). Make sure the file extension is .ahk and not .txt.

3. Create the Shortcut (This is the Key Step):

  • Right-click on your desktop or in a folder where you want to keep the shortcut.
  • Select “New” -> “Shortcut”.
  • In the location field, enter the following, carefully replacing the paths:
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "C:\Path\To\Your\Script\firefox_toggle.ahk"
* **Important:**
    * The *first* path (`"C:\Program Files\AutoHotkey\AutoHotkey.exe"`) is the path to your AutoHotkey executable.  Adjust this if AutoHotkey is installed in a different location.
    * The *second* path (`"C:\Path\To\Your\Script\firefox_toggle.ahk"`) is the full path to the `.ahk` script file you saved in the previous step.  Make sure to enclose both paths in double quotes.
  • Click “Next”.
  • Give the shortcut a name (e.g., “Firefox Toggle”).
  • Click “Finish”.

4. Pin to Taskbar:

  • Right-click the shortcut you just created (not the .ahk file itself).
  • Select “Pin to taskbar”.

Explanation of why this works:

The crucial part is the shortcut. You’re not pinning the script directly. Instead, you’re creating a shortcut that tells AutoHotkey to run your script. Windows recognizes the shortcut as a program launcher (because it points to AutoHotkey.exe), and therefore it can be pinned. The script itself then handles the logic of checking for Firefox and either quitting or launching it.

Troubleshooting:

  • Double-check the paths: The most common problem is incorrect paths in the shortcut’s target location. Make absolutely sure they are correct.
  • File association: If double-clicking the .ahk file still opens the AutoHotkey help, re-associate .ahk files with AutoHotkey.exe as described in my previous responses.
  • Run as administrator (if needed): If you still have problems, try right-clicking the shortcut and selecting “Run as administrator.”

If you follow these steps carefully, it should work. Let me know if you run into any issues, and we can troubleshoot further!

Getting help from Microsoft Copilot to create a quit button in Firefox

I had to use stackedit.io to convert the markdown formatted from the Copilot copy button to html to post here.

Got it! To create a Firefox extension that quits all windows, we’ll adjust the background.js script accordingly:

Step-by-Step Guide to Create a Firefox Extension with a Quit Button that Quits All Windows

  1. Create a Project Directory: Set up a new directory, e.g., quit_button.

  2. Create manifest.json:

    • Inside the directory, create a file named manifest.json with this content:
    {
      "manifest_version": 2,
      "name": "Quit Button",
      "version": "1.0",
      "description": "Add a Quit Button to the toolbar",
      "browser_action": {
        "default_icon": {
          "16": "icons/page-16.png",
          "32": "icons/page-32.png"
        }
      },
      "background": {
        "scripts": ["background.js"]
      }
    }
    
  3. Create Icons:

    • Inside the quit_button directory, create a subdirectory named icons and add your button icons (page-16.png and page-32.png). You can download these icons from resources such as Icon Library, Iconduck, Icon-Icons, Flaticon, or Icons8.
  4. Create background.js:

    • Inside the quit_button directory, create a file named background.js with this content:
    function quitAllWindows() {
      browser.windows.getAll({populate: true}).then((windows) => {
        for (let window of windows) {
          browser.windows.remove(window.id);
        }
      });
    }
    
    browser.browserAction.onClicked.addListener(quitAllWindows);
    
  5. Load Your Extension:

    • Open Firefox and go to about:debugging.
    • Click “This Firefox”.
    • Remove any currently loaded extension and reload your new extension by selecting the manifest.json file.
  6. Pin the Extension to the Toolbar:

    • Click on the puzzle piece icon (Extensions button) in the Firefox toolbar.
    • Find your “Quit Button” extension in the drop-down list and click on the pin icon next to it to pin it to the toolbar.
  7. Check for Errors:

    • Open the Developer Tools in Firefox (Ctrl + Shift + I).
    • Go to the “Console” tab and look for any error messages related to your extension. This can provide clues about what might be wrong.

By following these steps, your custom quit button should be able to close all open windows in Firefox. If you need any further assistance, feel free to ask!

Of course! Here’s a list of all the prompts you used during this session:

  1. Initial Inquiry: “Microsoft Copilot”
  2. Custom Button for Toolbar: “easiest way to add custom button to toolbar in firefox”
  3. Quit Button: “easiest way to create a button to quit in firefox”
  4. Extension Not Found: “that extension cannot be found”
  5. Alternative Extensions: “that add-on cannot be found”
  6. Create Extension: “easiest way to create extension to add a quit button to the toolbar in firefox”
  7. Icons for Extension: “where to get the icons”
  8. Button Not Appearing: “button did not appear”
  9. Manifest and JSON Errors: “Error details: Protocol error (SyntaxError): JSON.parse: end of data after property value in object at line 18 column 1 of the JSON data from: server0.conn0.webExtensionDescriptor2177 (resource://gre/modules/Extension.sys.mjs:1167:26)”
  10. Correct Manifest: “which manifest.json to use?”
  11. Final Step to Pin Extension: “there is one final step is missing from your directions. I need to pin to toolbar from the extension drop list.”
  12. Recap Correct Steps: “now repeat the correct steps to me again.”
  13. Quit All Windows: “I want to quit ALL windows”
  14. List All Prompts: “list all the prompts i used for this session.”

If you need any further assistance or have more questions, feel free to ask!

As shown in the beginning I couldn't find an addon to do the job.

Copilot missed out the pin button to toolbar part in the intial run. Nonetheless I am very impressed! The hand holding is incredible. :P

Monday, May 09, 2022

[Update: May 2022] How to trick the heart rate monitor on your fitness tracker (NSC edition)

Disclaimer: The following information provided is for educational and experimentation purposes.

Recently I've seen a spike in interest over this topic based on Google search results. Hence I will give a quick summary on the latest garbage trackers given free to participants of the steps challenge.

Testing performed on AXTRO FIT (Season 4) & Axtro Fit 3 (Season 6)
Final results and conclusion:
Certain clear or reflective surfaces may induce trackers to record MVPA values, surprisingly consistently. Steps count sensitive to vibratory effects from simple rotary mechanisms such as fan motor will work.

Thursday, March 24, 2022

Don't throw out that Xiaomi Powerbank 5000 yet...

If you have a Xiaomi Powerbank 5000 and find that it keeps flashing the full LEDs when charging but when discharging to a device, it instead flashes one LED, then it could be the wire for the temperature sensor has broken off the circuit board.

Open up the powerbank on the non USB port side with a blade and screwdriver then slide it out at the opposite end. You may find that the one or both of the two wires connected from the battery to the circuit board may be disconnected from its solder point. Solder them back then test it. If it works then put it back together.

This video shows where the wires are:



Sunday, January 09, 2022

Getting into Recovery mode for Nexus 5

  1. Hold Power button + Volume DOWN button to boot into the Bootloader
  2. Press any volume buttons until "Recovery" is shown and press the Power button. 
  3. Phone will reboot and show an Android with the exclamation point appearing above the stomach shows with "No Command" below.
  4. While holding the Power button, press once on the Volume UP button and it will go into Recovery mode.

Friday, July 09, 2021

Snapdrop.net: the dead simple way to share files across devices

Just go snapdrop.net on all your devices. Then start sharing files.

Snapdrop is opensource and you can view the code on github.

Monday, February 22, 2021

SMS forwarding to email on Android

There are too many lame apps on Google Play store that can't do this easily. I want to redirect SMS to forward to my email account, using my own mail service. The alternative was to use IFTTT but I found that the following using Automate app processes it faster; the SMS almost immediately forwards to email upon receiving it.

1. Download Automate by LlamaLab from Google Play Store.

2. Launch Automate, search for "Forward SMS to Email" in Community

3. Select "Forward SMS to Email v1.4" then Download the Flow

4. Run the Flow and follow directions to fill in your email addresses for Recipient and Sender.

Do check out Automate for other purposes.

Thursday, December 24, 2020

You can have 3D Christmas Tree LED lights by...

Buying it...

Or building it!

Tuesday, August 25, 2020

Samsung Email app controls light and dark mode

I found this little neat trick on my Samsung S7 phone. The Samsung Email app is controlling the phone's setting for light/dark mode. There is probably a setting for those on One UI with Android Pie or greater. But this is probably one way to set dark mode for older Samsung phones still on Android Oreo and below without installing additional apps.

After launching the app, tap menu on the top left then the gear button at the top of the menu. Tap "Display style" then choose "Always dark". 

This will force all other Samsung apps to go into dark mode. It will also affect every other app that uses Launch Screen for its loading splash screen such as the Google Play store, Maps and Drive apps.

Monday, June 08, 2020

Do this before swapping out to new router

For Windows, go to command prompt and type in

ipconfig /release *

Wednesday, May 13, 2020

Read free SPH newspapers via NLB (Circuit Breaker Period)

Update: SPH fixed the issue by loading the correct newspaper viewer for desktop browser.

National Library Board (NLB) is providing free access to SPH newspapers during this circuit period when all libraries are closed, an NLB myLibrary ID account is required. The Straits Times epaper site it uses to display the full broadsheet pages does not work properly for desktop. You can double click to zoom in and out, and swipe (click and drag on mouse) to flip page. It only has one level zoom and pages can't be panned while zoomed which becomes tedious to view the papers. However there is a way around this. ST's own subscribers actually have a better viewer which actually can be accessed after logging into NLB.

1. In your browser, go to NLB ST Newspaper page, log into NLB.
2. Click on "The Straits Times" newspaper. This will open a new page to https://stepaper.straitstimes.com/jr/m/jc.api.m.php
3. Go to address bar and delete away every character except the top domain address, http://stepaper.straitstimes.com/. Hit enter to load page.

After loading the subscriber ST epaper, you can see a page navigation bar at the top of the screen with controls that help to navigate pages. You can also pan when zoomed-in and while zoomed-in there is a slider at the top to control zoom levels.



Monday, May 11, 2020

Recommended ad free QR code scanning apps for Android phones

This is my list of recommended QR code scanners:

Based off the QR code engine from Denso Wave, inventors of QR code. No ads.
QRQR app:
https://play.google.com/store/apps/details?id=com.arara.q

From the ZXing dev team of the popular open source barcode decoder used by majority of QRcode apps. No ads, open sourced.
Barcode scanner:
https://play.google.com/store/apps/details?id=com.google.zxing.client.android

From member of ZXing, enhanced version of original barcode scanner app. No ads.
Barcode Scanner+ (Plus/Simple)
https://play.google.com/store/apps/details?id=com.srowen.bs.android
https://play.google.com/store/apps/details?id=com.srowen.bs.android.simple

Alternatively, most Android phones that include Google Assistant can use the Lens feature to scan QR code. It may require a few more taps though.
https://www.howtogeek.com/410037/how-to-scan-qr-codes-on-android/


Tuesday, November 13, 2018

How to force restart Samsung phone without using screen menu

Nowadays you can only shutdown Samsung phone by holding the power button which brings up a menu with options for shutdown, restart and emergency mode. Without a working screen, there was no way to select from the menu.

I wanted to shutdown a Samsung Galaxy J7 Pro that I had the screen changed but it couldn't display anything. Holding down the power and volume down button until the phone vibrated did the trick.


Restart your device

In the unlikely event that your device becomes unresponsive, you can attempt a force restart. This will turn your device off and back on without affecting any data stored on the device.

How do I force my Galaxy S7 to restart when the screen is frozen?

Monday, October 29, 2018

How to trick the heart rate monitor on your fitness tracker

Disclaimer: The following information provided is for educational and experimentation purposes.

You can trick a heart rate monitor that uses optical sensor to spoof a heart rate reading. This should work on trackers that use photoplethysmography(PPG) sensors that usually have a green flashing LED on the back.

The following video presents an example of the trick using pulsating colours. A heart rate tracker is placed with the sensor facing the video and wait for it to detect a reading.


Video URL: Can You Fool A Heart Rate Monitor

Another way to mimic this is to make an alternating image of 2 colours and adjust the speed according to the heart rate you require. You can test a demontration of this with the HTML/CSS code I had made here: https://www.w3schools.com/code/tryit.asp?filename=FWOZYIEUO85Y. You may adjust the code such as the speed by changing the number in the animation element, ie. "animation-duration: 0.4s" and rerun it. Generally 0.4s should take the bpm above 120.

A very basic black and white blinking might even work as shown here.

Tested succesfully on PPG heart rate trackers from National Steps Challenge: Carereach HR and Tempo 2.


Certain static surfaces like tabletops, mats and tablecloths may even be able to trick the sensor to register heartrate.

Source: HPB National Steps Challenge (Singapore)

Other sources of info:
Photoplethysmogram
https://valencell.com/blog/2015/10/optical-heart-rate-monitoring-what-you-need-to-know/

Sunday, January 07, 2018

Don't buy Corel products if you hate pop up ads

I bought a Humble Bundle deal that had Corel Painter Essentials and Aftershot, installed them and started getting popup ads. These popup ads appear outside of the app even when you are not running Corel apps. Apparently this has been going on for many years even if you paid full price for their products. So to stop getting ad popups, I uninstalled them. Alternatively you can disable or delete any item that has Corel from Task scheduler in Windows to remove the popup ads.

Reference (Facebook post): https://www.facebook.com/corelpainter/posts/10154631865189283?comment_id=10155962484579283&comment_tracking=%7B%22tn%22%3A%22R9%22%7D

Monday, January 01, 2018

Download Canon Camera Software with Serial Number

Canon has some useful tools like their Digital Photo Professional software but you need a Canon camera serial number in order to download from their website. I had no interest to dig out the my camera's box so I searched and found following serial numbers to download Canon software from any Canon software download page.

  • Range 0910400001 – 0910402496
  • Range 0920400001 – 0920407771
  • Range 0930400001 – 0930417770

Source:Download Canon Camera Software with no Serial Number | Best Mac Tips

Sunday, May 18, 2014

Get free apps from Amazon Appstore for non-US users

I won't get into the details. Generally other then an Amazon account, you need two key items:

  1. Access to a US VPN.
  2. Amazon One-click set to a US postal address.
You can only purchase through the PC browser then download the apps through the Amazon Appstore app. I have not tried VPN on a mobile device but it may work.

That's really all there is to get free apps from Amazon Appstore. This should also work for Kindle and MP3 store. 

Warning: Try not to use your main Amazon account if the US address is not yours.

Wednesday, October 24, 2012

Palm Desktop memo importer for Evernote

I managed to migrate my old Palm OS memos to Evernote with this free program. An excellent tool with support for Linux, Windows and Mac OS that's simple to use and properly tags the memos.

Palm Desktop memo importer for Evernote