Lexmark “Flushing Buffer” on PDF

Error: You print a PDF document on your Lexmark Printer ( MS317DN in my case which is based on best selling MS320) , and get a message “Flushing Buffer” on the LCD Screen.

Quick Resolution : Print the Document as ” Print as Image”

This is caused mostly by corrupt or incompatible PS settings in the PDF you are trying to print. You may get to print after clearing the print queue, but in my case, it would never print a particular file ( a bank statement). Finally, I realized that if I print it as an Image instead of PDF, there is no language setting going to the printer and it worked.

Discord trick or treat bot

Alright, so my daughter got hooked on to this Trick or Treat craziness on Discord, and honestly I also found it amusing.

Not to cheat, I wanted to see if I could write a script in python to quickly help me type and get ahead of anyone.

It worked ! 10 Minutes of Scripting and it can get you endless cheating. I did collect 5 goodies , and then killed the script. What’s the fun in cheating, but this was enough to show my daughter the power of python.

Here is the script. Offcourse you would need the selenium chromedriver and python to run this .

import selenium ; from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import keyboard

dr=webdriver.Chrome(executable_path="c:/chromedriver.exe")
# in this window,login to Discourse

def cheat(my_key):
    input_field = dr.find_element_by_xpath('//*[@id="app-mount"]/div[2]/div/div[2]/div/div/div/div/div[2]/div/main/form/div/div/div/div/div[3]/div[2]')
    input_field.send_keys(my_key)
    input_field.send_keys(Keys.ENTER)


def t():
    latest= (dr.find_elements_by_class_name("username-1A8OIy")[-1]).get_attribute('innerHTML')
    if latest == "Trick'cord Treat" :        
        print(".",end='')
        msg = (dr.find_elements_by_class_name("container-1ov-mD")[-1]).get_attribute('innerHTML')
        if "h!trick" in msg :
            cheat("h!trick")
        if "h!treat" in msg :
            cheat("h!treat")
        

while True:
    t()
    #press b to break the loop 
    if keyboard.is_pressed('b'):break

Thunderbird Embed Image in Email Signature

Even in 2020 today, emails remain the primary mean of external communication ( at least in my organization). Email signature in such case becomes a powerful marketing channel which you can use to display your Vendor partnership and other marketing communication apart from the usual contact information

Images need to be included, and thats where the problem starts.

The most usual method of including images is to use an HTML signature, with an image element like

<img alt="Logo" style="width:125px; height:auto; border:0;" src="https://yourdomain.com/facebookicon.jpg" width="125" border="0">

Problem is that this image won’t show , till the recipient clicks on “Show Remote images”. Nobody Does that.

Solution ?

Encode it in base64, and embed that in the src, like this

<img alt="facebook icon" style="border:0; height:25px; width:26px;" src=" data:image/png;base64,LONGBASE64ENCODEINGHERE" width="26" height="25" border="0">

Offcourse, your email size is increased, but now your images are shown in the recipient email client- no matter what.

If you are irked by the blocked remote images , this solution may work for you.

Prestashop 1.7 Displaying 1 product in 2 categories

Problem : You have a product in 2 categories. However it only shows in the menu of the default category

Example : you have a Product called ‘ACME Face Mask’ with default category of ‘medical supplies’. It also belongs to ‘personal gear’ category. It only shows in Manu ‘Medical Supplies’

Resolution : Go to Modules > Faceted Search and disable the option ” Show products only from default category”

Google Sheets Large Numbers without Scientific Notion

Problem : Everytime you Type a large number in google sheets it starts to show in scientific notion like 1.23E+26.

Solution : Click on format as Number bar and select 0. Nothing else works.