Posts

Showing posts from 2020

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

Dial Unifi directly from Windows 10

Control Panel → Programs and Features Turn Windows features on or off Enable Hyper-V and restart Run Hyper-V Manager On the left pane, click your computer name On the right pane, open “Virtual Switch Manager” Create a new Virtual Network Switch → External → Create Under External Network, select your network card Check “Enable virtual LAN identification” and enter 500 Click OK (or Apply → OK) Go back to Control Panel → Network and Sharing Center Set up a new connection using your UniFi credentials

Synchronize between AWS S3 and Local Windows Drive

  Installed and configure AWS CLI   Use this command to sync: aws s3 sync [source] [destination] E.g: aws s3 sync s3://mybucket-name D:/folder1 To schedule, create batch file with the command and add that batch file to Task Scheduler   Credit: https://medium.com/@dangaldeependra/synchronize-between-aws-s3-and-local-windows-drive-52483e33a9e6

Count number of occurrences in MongoDB

 db.collection_name.aggregate(    {$group : { _id : '$field_name', count : {$sum : 1}}},    {$sort: { count: -1 } } )

Telegram icon in dark theme

sudo cp /usr/share/icons/breeze-dark/status/22/telegram* /usr/share/icons/breeze/status/22/ sudo cp /usr/share/icons/breeze-dark/status/24/telegram* /usr/share/icons/breeze/status/24/   Credit: https://github.com/telegramdesktop/tdesktop/issues/7399

Enable changing lock screen background

HKLM\Software\Policies\Microsoft\Windows\Personalization Delete NoLockScreen Restarted the computer   Credit: http://bmno.mcio.org/windows/Some%20Settings%20are%20hidden.html

Install Group Policy Editor

  https://drive.google.com/file/d/1di8tlKxbQFSs99Ew1gLjDF0h4VOvdSGm/view?usp=sharing   Credit: https://www.itechtics.com/enable-gpedit-windows-10-home/

How to copy text from Wattpad

 http://m.wattpad.com/########?m=-1

Remove Acrobat right-click context menu

 Run the Command Prompt (or PowerShell) as Administrator and enter these commands: cd /d C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat Elements regsvr32.exe /u ContextMenuShim64.dll regsvr32.exe /u ContextMenu64.dll regsvr32.exe /u ContextMenu.dll

List all fields in MongoDB collection

var task = db.collection_name.find().next(); for (let key in task){print(key)};

Mount windows share on ubuntu

Install the CIFS Utils pkg sudo apt-get install cifs-utils Create a mount point sudo mkdir /mnt/local_share Mount the volume sudo mount -t cifs -o user=<user on Windows> //<windows_ip_address>/<share_folder> /mnt/<local_share> You will be prompted for password   To mount at boot, add to /etc/fstab file: //<windows_ip_address>/<share_folder>cifs user=<user on Windows>,pass=<user passwd> 0 0  

Font too small in KDE Timer Widget

sudo nano /usr/share/plasma/plasmoids/org.kde.plasma.timer/contents/ui/TimerView.qml change readonly property int digitH: ((height / 2) * digits < width ? height : ((width - (digits - 1)) / digits) * 2); to readonly property int digitH: 14  14 is the font size, change to any size you want.   To add more timing: sudo nano /usr/share/plasma/plasmoids/org.kde.plasma.timer/contents/config/main.xml At line <default>30,60,120,300,450,600,900,1200,1500,1800,2700,3600</default> add any value in seconds  To use dark theme, create folder /usr/share/plasma/desktoptheme/YOUR_THEME/widgets copy file /usr/share/plasma/desktoptheme/oxygen/widgets/timer.svgz

Run MongoDB query form terminal

 mongo localhost:27017/db_name script_name.js > result

Add permanent alias

 Add at the end of file ~/.bashrc alias alias_command 'real command' To load newly created alias immediately: source ~/.bashrc

Move MongDB database

find mongodb config file sudo find / -name mongod.conf -print get dbPath from that file stop mongodb service mongod stop check mongodb is not running sudo systemctl status mongod copy all files from dbPath to new dbPath cp -r old_dbPath new_dbPath chown of new dbPath sudo chown -R mongodb:mongodb new_dbPath change dbPath in mongodb config file to new_dbPath start mongodb sudo systemctl start mongod

Show popup window

 https://wiki.gnome.org/Projects/Zenity

Dropbox not syncing

  sudo chattr -R -i "$HOME/Dropbox" sudo chown -R "$USER" "$HOME/Dropbox" chmod -R u+rw ~/Dropbox dropbox stop; rm -rf ~/Dropbox ~/.dropbox ~/.dropbox-dist; dropbox start -i   Note that Dropbox folder path point to default position. If you have changed this path, make appropriate corrections above

How to become root

sudo su

Mount HDD temporarily on Linux

sudo fdisk -l    mkdir /mnt/mount_name   sudo mount /dev/partition /mnt/mnt_name

Test speaker on Linux

speaker-test -t wav -c 6

Shortcut for app on PlayOnLinux

playonlinux --run appName

Force removal of broken package

sudo dpkg --remove --force-remove-reinstreq package_name

Enable double click to open item in KDE

System Settings, Workspace, Workspace Behavior, General Behavior, Click behavior

Delete all email from mail command

? delete * ? q

Stop Ubuntu from asking password

Run sudo visudo For certain command: username ALL = NOPASSWD: command 1 username ALL = NOPASSWD: command 1, command 2, command 3 Example hensem ALL = NOPASSWD: /bin/systemctl restart httpd.service, /bin/kill For everything: username ALL=(ALL) NOPASSWD:ALL For root: Find the line that says %admin ALL=(ALL) ALL and change it to %admin ALL=(ALL) NOPASSWD: ALL

Running GUI app in Cron

In ~/.profile add these 2 lines: xhost +local: xhost Add env DISPLAY=:0 before cron command 00 06 * * * env DISPLAY=:0 gui_appname To run cron as root or anacron, add this to ~/.bashrc xhost local:mpromber > /dev/null

Disabled Firefox Context Menu

about:config dom.event.contextmenu.enabled set to true

Copy local git branch

git branch copyOfMyBranch MyBranch git checkout copyOfMyBranch

Allow multiple git flow hotfix branches to exist at the same time

git flow config multi-hotfix true   or   git config --add gitflow.multi-hotfix true

Show all PHP errors

ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);

Total Commander FTP connections list

Help - About Total Commander wcx_ftp.ini

Get _id of document in Mongodb using PHP

$documentObject["_id"]->{'$id'}

Delete Git branch

delete branch locally git branch -d localBranchName delete branch remotely git push origin --delete remoteBranchName

Remove Copy to Sync Vault context menu

Computer\HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\SyncComContextShlExt Computer\HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\SyncComContextShlExt Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shellex\ContextMenuHandlers\SyncComContextShlExt

Capture the output var_dump

ob_start(); var_dump($var); $var_dump = ob_get_clean();

Lenovo System Update deferred install downloads location

C:\ProgramData\Lenovo\SystemUpdate\sessionSE\Repository

Remove Google Drive Context Menu

Computer\HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\GDContextMenu

Automatically Log Into Windows

Run netplwiz Uncheck Users must enter a user name......    If checkbox not available, run regedit, go to  Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device Change value DevicePasswordLessBuildVersion to 0.

Remove Pin to Quick Access context menu

https://drive.google.com/file/d/1zwahHtFOy4uTa62sY-mCMdPV7rgOpxm-/view?usp=sharing

Remove Language Bar or Input Indicator in Windows 10

Settings -> Time & Language -> Language Choose an input method to always use as default Switching input methods Tick Use the desktop language bar when it's available Language bar options Language bar: Select Hidden

Remove Libraries from Desktop

Delete Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{031E4825-7B94-4dc3-B131-E946B44C8DD5}

Remove Quick access from File Explorer

Image
Open File Explorer and go to View tab > Options > Change folder and search options . Choose This PC from the top drop-down menu. Uncheck both boxes under the Privacy section. Press Clear to clear all of your Quick Access history. (optional) Navigate to the following registry path: Computer\HKEY_CLASSES_ROOT\CLSID\{679f85cb-0220-4080-b29b-5540cc05aab6}\ShellFolder Inside "ShellFolder", double-click Attributes , and change data value from a0100000 to a0600000 , and click OK . Repeat at Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Classes\CLSID\{679f85cb-0220-4080-b29b-5540cc05aab6}\ShellFolder .

Remove Quick Access from Desktop

Computer\HKEY_CLASSES_ROOT\CLSID\{679F85CB-0220-4080-B29B-5540CC05AAB6}\ShellFolder Change Attributes value to a0700000

Remove 3D Objects from Navigation Pane

Delete these 2:  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A} HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A} Deny Everyone after delete.

Remove Burn with Nero Context Menu

Delete HKEY_CLASSES_ROOT\NeroShellExt.NeroShellExt2022 HKEY_CLASSES_ROOT\NeroShellExt.NeroShellExt2022.1 HKEY_CLASSES_ROOT\NeroShellExt.NeroShellExtRegistration2022 HKEY_CLASSES_ROOT\NeroShellExt.NeroShellExtRegistration2022.1 HKEY_CLASSES_ROOT\NeroShellExt.NeroShellExt2022 HKEY_CLASSES_ROOT\CLSID\{D9B73F1C-97C7-4A59-B688-42079AA3C931} HKEY_CLASSES_ROOT\CLSID\{CE8EF313-75FB-4B0B-97C7-3F01A2C0B9CB} HKEY_CLASSES_ROOT\Interface\{E4306558-A1F6-4739-B19A-4ECE96F1C9D8} HKEY_CLASSES_ROOT\AppID\{BF41C057-CDE2-4A09-A9E2-9FAE1A2B81A7} HKEY_CLASSES_ROOT\AppID\NeroShellExt.DLL HKEY_CLASSES_ROOT\AppID\NeroShellExt.DLL2022 HKEY_CLASSES_ROOT\TypeLib\{045E084A-8C36-4A9D-91FE-FE6B567C5764} HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\{CE8EF313-75FB-4B0B-97C7-3F01A2C0B9CB} HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\{CE8EF313-75FB-4B0B-97C7-3F01A2C0B9CB} HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\{CE8EF313-75FB-4B0B-97C7-3F01A2C0B9CB} Blank HKEY_...

Remove Share with Resilio Sync Context Menu

Computer\HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\Resilio Sync Service 2.6.4 Computer\HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\Resilio Sync Service 2.6.4

Remove HubiC Context Menu

{b1f1405d-94a1-4692-b72f-fc8caf8b8700}

Remove Macrium Reflect context menu

Computer\HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\ReflectShellExt Computer\HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\ReflectShellExt

Remove Turn on BitLocker Contect Menu

https://drive.google.com/file/d/17R_4RPo59sGC8Nnto0bWs5pdzBF4AUzK/view?usp=sharing

Remove Libraries from Windows Explorer

Computer\HKEY_CLASSES_ROOT\CLSID\{031E4825-7B94-4dc3-B131-E946B44C8DD5}\ShellFolder Change attributes value to b090010d Delete Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{031E4825-7B94-4dc3-B131-E946B44C8DD5}

Remove Share from Context Menu

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked If Blocked key does not exsit create it. Create a new string value here named {e2bf9676-5f8f-435c-97eb-11607a5bedf7}. Leave its data value empty. Restart computer. Credit: https://winaero.com/blog/remove-previous-versions-windows-10/

Remove the “Send To” Menu from Windows’ Context Menu

Computer\HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\SendTo Empty the REG_SZ value

Remove Pin To Start Context Menu

Delete: Computer\HKEY_CLASSES_ROOT\exefile\shellex\ContextMenuHandlers\PintoStartScreen Computer\HKEY_CLASSES_ROOT\exefile\shellex\ContextMenuHandlers\OpenGLShExt Computer\HKEY_CLASSES_ROOT\lnkfile\shellex\ContextMenuHandlers\OpenGLShExt   Run:  reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" /v "{E595F05F-903F-4318-8B0A-7F633B520D2B}" /f Search for all PintoStartScreen key in registry, change the REG_SZ (string) value to blank. For Open-Shell, delete: HKEY_CLASSES_ROOT\exefile\shellex\ContextMenuHandlers\StartMenuExt HKEY_CLASSES_ROOT\lnkfile\shellex\ContextMenuHandlers\StartMenuExt HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\StartMenuExt

Remove Include in Library Context Menu

Delete key Computer\HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\Library Location Credit: https://winaero.com/blog/remove-include-library-windows-10/

Remove Restore Previous Versions Context Menu in Windows 10

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked If Blocked key does not exsit create it. Create a new string value here named {596AB062-B4D2-4215-9F74-E9109B0A8153}. Leave its data value empty. Credit: https://winaero.com/blog/remove-previous-versions-windows-10/

Remove Give access to from context menu

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions Right-click the Shell Extensions (folder) key, select New , and click on Key . Name the new key Blocked and press Enter . (If the key already exists, you don't need to recreate it.)  Select the Blocked (folder) key, and right-click on the right side, select New , and click on String Value . Name the new String {f81e9010-6ea4-11ce-a7ff-00aa003ca9f6} and press Enter . Restart your computer. Credit: https://www.windowscentral.com/how-remove-give-access-option-context-menu-windows-10

Remove MegaSync Context Menu

Computer\HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\MEGA (Context menu) Computer\HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\MEGA (Context menu) Computer\HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\MEGA (Context menu) Computer\HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\MEGA (Context menu)

Remove Dropbox Context Menu

Delete HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shellex\ContextMenuHandlers\DropboxExt ​ HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shellex\ContextMenuHandlers\DropboxExt ​ HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\DropboxExt HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\DropboxExt Credit: https://www.reddit.com/r/dropbox/comments/drlt50/how_to_remove_send_with_transfer_from_context_menu/

Remove pCloud Context Menu

Image
Credit: https://www.pcloud.com/help/drive-help-center/can-i-disable-the-context-menu-of-the-pcloud-drive

Remove CRC-SHA entry from Context Menu

Image
Open 7-Zip Credit: https://www.thewindowsclub.com/remove-crc-sha-entry-from-context-menu

Remove Winamp's Right Click Context Menu Options

Image
  Credit: http://greasypc.blogspot.com/2008/06/remove-winamps-right-click-context-menu.html

Remove Browse with Corel PiantShop Pro context menu

Delete these registry entries:   Computer\HKEY_CLASSES_ROOT\Directory\shell\Browse with Corel PaintShop Pro 2022 Computer\HKEY_CLASSES_ROOT\Drive\shell\Browse with Corel PaintShop Pro 2022 Credit: https://forum.corel.com/EN/viewtopic.php?t=43691

Find column in MySQL

SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME IN ('columnA','ColumnB') AND TABLE_SCHEMA='YourDatabase';

How to Get The Full URL and Parts In PHP

<?php function getFullURL ($strip = false) { // getFullURL() : gets the full URL // PARAM $strip - strip away the query and hash portion // THE PROTOCOL $url = ( isset ($_SERVER[ 'HTTPS' ]) ? "https://" : "http://" ); // HOST $url .= $_SERVER[ 'HTTP_HOST' ]; // SET THE PORT ONLY IF IT IS NOT HTTP/HTTPS if ($_SERVER[ 'SERVER_PORT' ]!= 80 && $_SERVER[ 'SERVER_PORT' ]!= 443 ) { $url .= ":" . $_SERVER[ 'SERVER_PORT' ]; } // THE PATH, FILE NAME, AND QUERY $url .= $_SERVER[ 'REQUEST_URI' ]; // STRIP QUERY AND HASH if ($strip) { $url = strtok($url, '?' ); $url = strtok($url, '#' ); } // THE ENTIRE URL return $url; } ?> Credit: https://code-boxx.com/php-url-parts/

Remove your User Folder from Navigation Panel

Run regedit Go to HKEY_CLASSES_ROOT\CLSID\{59031a47-3f72-44a7-89c5-5595fe6b30ee}\ShellFolder Change Attributes to f094012d ( Change owenr/permission if needed) Delete PinToNameSpaceTree (if there)  Go to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{59031a47-3f72-44a7-89c5-5595fe6b30ee}\ShellFolder Repeat step above