Архив на категория: Tips & Tricks

YouTube ads uBlock Origin workaround

First step on how to get around „Ad blockers are not allowed on YouTube“ dialog?

Easiest solution for your browser (no matter the OS) is to use a verified extension like uBlock Origin available for:

Second step

Find the extension in the browser’s toolbar, click on it and select the settings icon at the bottom right of the pop-up dialog. Go to „My filters“ tab and paste the following code:

youtube.com##+js(set, yt.config_.openPopupConfig.supportedPopups.adBlockMessageViewModel, false)

youtube.com##+js(set, Object.prototype.adBlocksFound, 0)

youtube.com##+js(set, ytplayer.config.args.raw_player_response.adPlacements, [])

youtube.com##+js(set, Object.prototype.hasAllowedInstreamAd, true)

Click „Apply changes“

Filter credits: Followchain

How to disable hardware media control keys for your browser (Firefox or Chrome)

Lately it’s been really annoying that browsers integrate media controls. Especially if you are sharing screen at the work place, nobody cares if you are listening to Katy Perry or Tyler Cassidy

Firefox

  1. Open firefox
  2. Head to about:config
  3. Accept warning and look for media.hardwaremediakeys.enabled
  4. Set it false
  5. Restart the browser

Chrome

  1. Open Chrome
  2. In the address bar type-in chrome://flags/#hardware-media-key-handling
  3. Set it to „Disabled“
  4. Look for chrome://flags/#global-media-controls-cast-start-stop
  5. Set it to „Disabled“
  6. Restart the browser

Linux: installing global npm packages without using sudo (a.k.a. resolving EACCES permissions errors when installing packages globally)

1. Create a directory where global packages will be deployed:

mkdir ~/.npm-global

2. Set the newly created directory as default global directory for npm:

npm config set prefix '~/.npm-global'

3. Update the $PATH environment variable by adding this to your .profile file (in your user home directory) so that the terminal knows where to find the global packages:

export PATH=~/.npm-global/bin:$PATH

4. Reload environment in current shell by running (or just open a new one):

source ~/.profile

5. Test if the setup was successful by installing a package (without using sudo):

npm i -g jshint

6. And running it (should print out jshint version):

jshint --version

Stay healthy!