Posts

Get distinct value in MongDB

 db.the_collection_name.distinct('the_field_name')   To get count of distinct value var collection = "the_collection_name"; var field = "the_field_name"; db[collection].distinct(field).forEach(     function(value) {         print(field + ", " + value + ": " + db[collection].count({[field]: value}))     } )

Remove Git Context Menu

 Delete   Computer\HKEY_CLASSES_ROOT\Directory\Background\shell\git_gui Computer\HKEY_CLASSES_ROOT\Directory\Background\shell\git_shell Computer\HKEY_CLASSES_ROOT\LibraryFolder\background\shell\git_gui Computer\HKEY_CLASSES_ROOT\LibraryFolder\background\shell\git_shell Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\git_gui Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\git_shell   Credit:  https://superuser.com/questions/1347461/remove-item-from-context-menu-of-folder-empty-space https://stackoverflow.com/questions/47084443/how-to-remove-git-from-menu-context-in-documents

Remove Media Player context menu

  Remove "Add to Windows Media Player list" Context Menu     Remove "Play with Windows Media Player" Context Menu   Credit: https://www.tenforums.com/tutorials/83163-remove-add-windows-media-player-list-context-menu-windows-10-a.html https://www.tenforums.com/tutorials/83169-remove-play-windows-media-player-context-menu-windows-10-a.html

Remove Cast to Device context menu

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked If Blocked does not exist, create the key Inside the Blocked key, right-click on the right, select New and click String Value. Name the string {7AD84985-87B4-4a16-BE58-8B72A5B390F7} and press Enter Restart Computer   Credit: https://www.windowscentral.com/how-remove-cast-device-option-context-menu-windows-10

Remove Context Menu for files

HKEY_CLASSES_ROOT\SystemFileAssociations\[some extension or file type]\shell Delete each file type for program in context menu Credit: https://www.sevenforums.com/general-discussion/284984-how-remove-media-info-right-click-menu.html  If this does not work, HKEY_CLASSES_ROOT\*\shell\[some action / program name] On the right, create a new string value ProgrammaticAccessOnly Leave its value data empty. Another entry in registry: Computer\HKEY_CLASSES_ROOT\Directory\shell Credit: https://winaero.com/remove-share-with-skype-from-context-menu-in-windows-10/  

Remove Foxit PhantomPDF context menu

Computer\HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\Foxit_ConvertToPDF   Computer\HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\Foxit_ConvertToPDF

Turn off WiFi Power Setting in Ubuntu

  sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf   wifi.powersave = 2   Other value: 0: use the default value 1: don't touch existing setting 2: disable powersave 3: enable powersave