Skip to content

Instantly share code, notes, and snippets.

View sidneys's full-sized avatar

sidneys sidneys

  • Germany
View GitHub Profile
@gagarine
gagarine / win11-mouse-scroll-reverse.md
Last active April 25, 2024 06:54
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" }
@nico-lab
nico-lab / helper.py
Created January 26, 2022 11:27
https://ikyle.me/blog/2020/add-mp4-chapters-ffmpeg より時間とチャプター名からチャプターをつくるPythonスクリプト
import re
chapters = list()
with open('chapters.txt', 'r') as f:
for line in f:
x = re.match(r"(\d):(\d{2}):(\d{2}) (.*)", line)
hrs = int(x.group(1))
mins = int(x.group(2))
secs = int(x.group(3))
# Always use the integrated graphics card while running on battery power
sudo pmset -b gpuswitch 0
# Always use the discrete graphics card while running on battery power
sudo pmset -b gpuswitch 1
# Switch between discrete and integrated graphics cards automatically while running on battery power
sudo pmset -b gpuswitch 2
/**
* Author: JCloudYu
* Create: 2020/05/07
**/
(()=>{
"use strict";
const _PUSH_STATE = window.history.pushState;
const _REPLACE_STATE = window.history.replaceState;
@webketje
webketje / README.md
Last active April 14, 2024 03:10
Soundcloud Downloader Clean - Tampermonkey userscript OR bookmarklet

Tampermonkey userscript - Soundcloud Downloader Clean

An ad-less, multilingual, clean Soundcloud downloader with robust code. Adds a 'Download' button to all single track views.

Features

  • No third-party embeds, redirects or ads, directly uses the Soundcloud API.
@ArnoldsK
ArnoldsK / reduce_video_file_size.sh
Last active January 21, 2024 10:42
Bash script for reducing a file size of a video using ffmpeg to reduce bitrate
#!/bin/bash
# Usage:
# ~$ sh reduce_video_file_size.sh [./input.mp4] [size mb] [./output.mp4]
# Parameters can be preset or set by providing none
# Input and output names must end with ".mp4"
# Can use Git Bash to run the script on Windows
display_help() {
local FILE=`basename "$0"`
@bbqtd
bbqtd / macos-tmux-256color.md
Last active April 24, 2024 01:28
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):

@sidneys
sidneys / de.sidneys.applescript.toggle-macos-accessibility-keyboard.scpt
Last active May 26, 2021 15:08
AppleScript | Toggle Accessibility Keyboard (macOS)
(*
* toggle-macos-accessibility-keyboard
* applescript
*
* description:
* macOS automation script to toggle the macOS Accessibility Keyboard.
* Shows and hides the keyboard depending on its current state.
*
* author: sidneys
* homepage: http://sidneys.github.io
@rudolfratusinski
rudolfratusinski / parallels_tools_ubuntu_new_kernel_fix.md
Last active November 23, 2022 20:01
Parallels Tools fix for Ubuntu 18.04 and other Linux distributions with Kernel version >= 4.15

Preparation

  • In open Ubuntu 18.04 machine click Parallels Actions -> "Install Parallels Tools"

  • A "Parallels Tools" CD will popup on your Ubuntu desktop.

  • Open it by double mouse click, copy all the content to a new, empty directory on a desktop, name it for e.g. "parallels_fixed"

  • Open terminal, change directory to parallels_fixed (cd ~/Desktop/parallels_fixed)

  • Make command line installer executable (chmod +x install)

  • Change directory to "installer" (cd installer)

  • Make few other scripts executable: chmod +x installer.* *.sh prl_*

@nzec
nzec / README.MD
Last active February 23, 2024 01:08
DeezLoader Offical Page

Thanks to /u/zpoo32 for reporting several issues in this list!

Deemix

  • deemix: just the cli and the library
  • deemix-pyweb: the app with a GUI
  • deemix-server: just the server part of deemix-pyweb