Saturday, 26 January 2019

Firefox Instagram HashTag Search Add-on

The following extension adds a menu item to the right-click menu that enable you to search for the selected text. The words in the selected text is checked against a list of stop words. Subsequently, a configurable maximum number of limit words are chosen for Instagram hashtag search.

Create a folder named search_instagram and add the following manifest.json and search_instagram.js files to this folder.



Go to about:debugging in Firefox and click Load Temporary Add-on and load the manifest.json file. Then right-click on the selected text on a webpage to do a hashtag search on Instagram.

Thursday, 24 January 2019

MacOS Command Line Audio File Player (afplay)

The command afplay in MacOS lets you play audio files in command line. Simply passing the file name to the command plays the entire audio file:

afplay song.mp3

You can check the available command line options to the command by looking at the man page (man afplay) or by entering the command only without any parameters (afplay). It is possible to change the volume, play duration, quality, etc.

Suppose you want to play an audio file with specified interval, say 10 seconds:

while true; do afplay song.mp3; sleep 10; done

Suppose you want to play an audio file at Random intervals:

while true; do afplay song.mp3; sleep $RANDOM; done

Here, $RANDOM is a uniform random number generator in the range 0 to  32767.

Wednesday, 23 January 2019

Firefox Advanced Youtube Search Add-on - Sort Criteria

The following extension adds a menu item to the right-click menu that enables you to search for the selected text with specified sort criteria - Relevance, Upload Date, View Count, Rating.

Create a folder named search_youtube_sort and add the following manifest.json and search_youtube_sort.js files to this folder.

Go to about:debugging in Firefox and click Load Temporary Add-on and load the manifest.json file. Then right-click on the selected text on a webpage and choose the sort criteria to search in Youtube.

Tuesday, 22 January 2019

Firefox Youtube Search Add-on

The following extension adds a menu item to the right-click menu that enabled you to search for the selected text.

Create a folder named search_youtube and add the following manifest.json and search_youtube.js files to this folder.




Go to about:debugging in Firefox and click Load Temporary Add-on and load the manifest.json file. Then right-click on the selected text on a webpage to search in Youtube.

Monday, 21 January 2019

Amazon to eBay Firefox Automatic Link Generator Add-on/Extension

The following extension adds a link to the eBay search page on the Amazon product page for the product being viewed for comparison. Clicking on the link opens a new tab with eBay search results for the Amazon product. 

Create a folder named amazon_ebay and add the following manifest.json and amazon_ebay.js files to this folder.



Go to about:debugging in Firefox and click Load Temporary Add-on and load the manifest.json file.





Then visit a product page on Amazon (amazon.com) and there will be a link 'eBay', just below the product title, pointing to the corresponding search results in eBay (ebay.com). By making appropriate changes to the manifest.json and amazon_ebay.js files you can get this extension to work on Amazon/eBay of different countries.

Wednesday, 23 May 2018

Reduce WiFi Transmit Power of a Raspberry Pi

The following command can be used to check the WiFi transmit power of your Raspberry Pi running Raspbian:

iwconfig wlan0

Output:

wlan0 IEEE 802.11 ESSID:"SSID" 
Mode:Managed Frequency:2.437 GHz Access Point: XX:XX:XX:XX:XX:XX
Bit Rate=5.5 Mb/s Tx-Power=10 dBm 
Retry short limit:7 RTS thr:off Fragment thr:off 
Power Management:on 
Link Quality=40/70 Signal level=-70 dBm 
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 
Tx excessive retries:19 Invalid misc:0 Missed beacon:0



Here the transmit power is Tx-Power=10 dBm. The following command can be used to change the WiFi transmit power:

sudo iwcofig wlan0 txpower 1


Then running the previous command will give the following output:

wlan0 IEEE 802.11 ESSID:"SSID" 
Mode:Managed Frequency:2.437 GHz Access Point: XX:XX:XX:XX:XX:XX
Bit Rate=5.5 Mb/s Tx-Power=1 dBm 
Retry short limit:7 RTS thr:off Fragment thr:off 
Power Management:on 
Link Quality=40/70 Signal level=-70 dBm 
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 
Tx excessive retries:19 Invalid misc:0 Missed beacon:0

Friday, 29 September 2017

A life changing message from Shahrukh Khan - the second richest actor in the world





"7 out of 10 things I do are highly uncreative"

"I take the money I make out of those 7 movies, and I would like to create a production house that will make the kind of movies that I would like to make"

"Don't stay poor and hungry, you owe it to your life, you owe it to your parents"

"When you get into a position of choice, don't misuse it"

Shahrukh Khan although hates the highly uncreative bits of work he does, he continues to do that to get into a position of choice, at which he can make the choices he would like to make. Being creative doesn't justify staying hungry and poor. First make sure that you meet your basic needs and once you do that, you get into a position of choice. When you get into a position of choice don't cheat with your choices.