Skip to content

Instantly share code, notes, and snippets.

gagarine /
Last active May 15, 2024 18:30
Reverse Mouse Wheel scroll in Windows 11 (Natural Mode like MacOS)

Reverse Mouse Wheel scroll in Windows 11

Chose between natural mode like MacOS or Windows default mode.

Step 1: Open Windows PowerShell in Administrator Mode.

You can do this by going to Start Menu, type PowerShell, and click Run as Administrator.

Step 2: Copy the following code and paste it in the command line of Windows PowerShell:

$mode = Read-host "How do you like your mouse scroll (0 or 1)?"; Get-PnpDevice -Class Mouse -PresentOnly -Status OK | ForEach-Object { "$($_.Name): $($_.DeviceID)"; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters" -Name FlipFlopWheel -Value $mode; "+--- Value of FlipFlopWheel is set to " + (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters").FlipFlopWheel + "`n" }
gagarine /
Created July 30, 2021 12:42
Deploy local nodejs project on Azure App Service using Azure CLI and zip package
echo 'Cleanup...'
rm -r node_modules
echo 'Build...'
npm install
npm run build
zip -r . -x '.git/*' -x 'src/*' -x '.idea/*' -x '.env'
echo 'Deploy...'
az webapp deployment source config-zip --resource-group MyGroup --name MyProject --src
gagarine / gist:a187b44ecff35f68b3f14b257d97c44c
Created March 3, 2021 22:31
MacOS: remove the Firefox message "Your browser is being managed by your organisation"
In the terminal launch the following command and restart Firefox:
sudo defaults write /Library/Preferences/org.mozilla.firefox EnterprisePoliciesEnabled -bool FALSE
To know more about policies =>

Firefox write/read a lot on the disk. This can reduce the performance of other program.

In about:config

Reduce latency of session write

browser.sessionstore.interval to 600000 (1 hours)

This value is in ms.Default is 15000ms (every 15 seconde).

gagarine /
Last active May 10, 2024 11:29
Install fish shell on macOS Mojave with brew

Installing Fish shell on MacOS (Intel and M1) using brew

Fish is a smart and user-friendly command line (like bash or zsh). This is how you can instal Fish on MacOS and make your default shell.

Note that you need the package manager installed on your machine.

Install Fish

brew install fish

gagarine / survey.r
Last active July 4, 2018 13:48
### Packages
install.packages(c( "rstudioapi", "corrplot"))
gagarine /
Created April 15, 2018 19:51

Keybase proof

I hereby claim:

  • I am gagarine on github.
  • I am perdrisat ( on keybase.
  • I have a public key ASDCDme3531K0n5Y30Urub_ld7T8w3Nu4-msaTcuqTNqQgo

To claim this, I am signing this object:

gagarine / .eslintrc.json
Last active March 17, 2021 07:52
package.json with npm script and config for webextension, can be addapted for any JS/HTML app or website.
"env": {
"browser": true,
"es6": true
"extends": "eslint:recommended",
"rules": {
"indent": [
gagarine /
Last active June 7, 2023 07:54
Howto Install clamav on OSX with brew

Howto Install clamav on OSX with brew

Note: on legacy intel system the path may be /usr/local/etc/clamav instead of /opt/homebrew/etc/clamav/

$ brew install clamav
$ cd /opt/homebrew/etc/clamav/
$ cp freshclam.conf.sample freshclam.conf