Skip to content

Instantly share code, notes, and snippets.

@ryrun
ryrun / helpme.md
Last active August 30, 2022 19:59
Missing Power mode in Windows 11

Power mode in Windows 11 (Windows performance power slider)

What is power mode: https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/customize-power-slider

It seems, when you have missing power schemes in the registry, the combobox will be hidden: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes

There should be power schemes for each (balanced, energy saver, ...) where the friendlyname have the word "Overlay".

Easiest way to fix this is to export "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power" from a working computer and import it to on the broken computer. After restart, the slider comes back.

@ryrun
ryrun / no_margin.lua
Created June 9, 2022 17:25
REnoise ViewBuilder API remove margin from buttons
local function _b()
return vb:horizontal_aligner {
width = gridStepSizeW-2,
mode = "center",
vb:vertical_aligner {
height = gridStepSizeH-2,
mode = "center",
vb:button {
width = gridStepSizeW,
height = gridStepSizeH,
@ryrun
ryrun / chrome_save_password_selfsigned_https.md
Created May 3, 2022 21:37
Howto save password to browser chrome on EdgeMax / EdgeRouter X

On desktop, its not possible, because of the self signed SSL certificate. But there is a simple work around. Currently tested only on a iOS device.

The Chrome Mobile version for iOS does save the password, even non self signed login pages with a certificate error. It will ask you to save it on the first login, when not use the key symbol in the URL bar. When you sync your google account, it takes some seconds, when the password is atleast avaible to broiwse on the desktoip version of chrome.

@ryrun
ryrun / bufferbloating-mtu-test-ping.md
Last active April 28, 2022 00:28
Buffer Bloating, Speed Test, TCP resend, set MTU on windows, Fritzbox (Modem Modus / Bridge Mode / PPPoE Passthrough)

Set MTU on Windows

  • open CMD with admin rights
  • check current set MTU: netsh interface ipv4 show interfaces
  • do a ping test with different size, till no fragment is occurring (-l = size of packet): ping 8.8.8.8 -f -l 1464
  • add 28 to the value to get the "optimal" mtu
  • set MTU: netsh interface ipv4 set subinterface "interface name" mtu=1492 store=persistent

Buffer Bloating testing

@ryrun
ryrun / switch-energy-plan.cmd
Last active January 18, 2022 21:46
Batch Script for switching energy plan as one liner in Windows
rem ////////////////////////////////////////////////////////////////////////
rem //
rem // Change the guid (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx) for your balanced and low energy. Use powercfg -list
rem // Also replace " Ausbalanciert)" with the name for balanced profile.
rem //
rem // "&&" Means execute when success
rem // "||" Means execute when error
rem //
rem // powercfg -list | findstr /C:"..." Means list all power profiles and search for a string
rem //
@ryrun
ryrun / epic2steam.md
Last active March 5, 2024 17:10
Using EPIC launcher games in steam with overlay

How to get steam overlay working for epic launcher games

  1. create a shortcut link on desktop for the specific game in epic launcher
  2. Go to the properties of this shortcut and copy the url For Tony Haw's Pro Skater 1+2 its: "com.epicgames.launcher://apps/Guppy?action=launch&silent=true"
  3. Go to steam and add a non steam game to your lib
  4. Search for '''cmd.exe'''
  5. Change the launch properties to /k start com.epicgames.launcher://apps/Guppy?action=launch^&silent=true & exit
  6. Change the name and icon if you will
@ryrun
ryrun / noteoff2.lua
Created October 17, 2020 17:22
protplug midi script: "note tie", delay note offs till next note on event
require "include/protoplug"
lastoff = 0
function plugin.processBlock(samples, smax, midiBuf)
playEvents = {}
for ev in midiBuf:eachEvent() do
if ev:isNoteOn() and ev:getNote() ~= lastoff and lastoff>0 then
table.insert(playEvents, midi.Event(ev))
table.insert(playEvents, midi.Event.noteOff(
@ryrun
ryrun / midi-drone-note.lua
Last active April 17, 2021 16:49
Midi script for VST protoplug for "drone" notes
require "include/protoplug"
noteOn = 0
function plugin.processBlock(samples, smax, midiBuf)
blockEvents = {}
-- drone note, 72 = C
local rootNote = 69
for ev in midiBuf:eachEvent() do
@ryrun
ryrun / autoreload.js
Last active March 3, 2020 10:15
Simple auto reload page on change, Live edit / Live preview
//pretty dirty autoreload script
var lastMod = [];
var files = [window.location.href];
var countReq = 0;
var hidden = false;
function __autoreload() {
var checkfiles = true;
if (document.hasFocus()) {
checkfiles = false;
@ryrun
ryrun / simple_openproject_api_calls.php
Created February 12, 2020 08:29
Using OpenProject API in PHP, some exmaples
<?php
/**
The current openproject api is missing some exmaples. This is what i got working in PHP.
*/
function _request( $req, $postdata = false, $requesttype = 'POST' )
{
$ch = curl_init();
if ( preg_match( '~^/api/v3(.*)~', $req, $temp ) ) {
$req = $temp[ 1 ];
}