Skip to content

Instantly share code, notes, and snippets.

View materemias's full-sized avatar

Máté Rémiás materemias

  • Codecool
View GitHub Profile
@materemias
materemias / plasma-restart.service
Created May 1, 2021 09:52 — forked from jmz-b/plasma-restart.service
restart KDE Plasma on resume from sleep (helps with nvidia video memory corruption problems)
#~/.config/systemd/user/plasma-restart.service
#systemctl --user enable plasma-restart.service
#systemctl --user start plasma-restart.service
#systemctl --user status plasma-restart.service
#systemctl --user stop plasma-restart.service
#sudo loginctl enable-linger <username>
#systemctl --user daemon-reload
#systemctl --user daemon-reexec
[Unit]
Description=Restart plasmashell after resuming
@materemias
materemias / binance-liquidation-calculator.py
Created March 14, 2021 23:11 — forked from highfestiva/binance-liquidation-calculator.py
CLI Binance liquidation calculation formula
#!/usr/bin/env python3
maint_lookup_table = [
( 50000, 0.4, 0),
( 250000, 0.5, 50),
( 1000000, 1.0, 1300),
( 5000000, 2.5, 16300),
(10000000, 5.0, 141300),
(20000000, 10.0, 641300),
@materemias
materemias / bitmex-liquidation-calculator.py
Created March 14, 2021 23:11 — forked from highfestiva/bitmex-liquidation-calculator.py
cli bitmex liquidation calculation formula, minimal implementation
#!/usr/bin/env python3
import argparse
from math import ceil, floor
sign = lambda amt: -1 if amt<0 else (1 if amt>0 else 0)
class dobj:
@materemias
materemias / Fix_standby_battery_drain_MBPro-BigSur.md
Created March 14, 2021 11:50 — forked from bluewalk/Fix_standby_battery_drain_MBPro-BigSur.md
Fix standby battery drain Macbook Pro - Big Sur

Fixing standby battery drain issue Macbook Pro - Big Sur

1. Reboot into recovery mode

  1. Disable FileVault (System Preferences -> Security & Privacy -> FileVault -> Turn Off Filevault)
  2. Boot to recovery mode by holding Command + R during boot

2. Preparation

  1. Open Terminal
  2. Run csrutil authenticated-root disable to disable signature validation on the bootable snapshots
  3. Run ioreg -l | grep board-id to get your board ID and write it down.
@materemias
materemias / keybase.md
Last active February 2, 2017 21:49
keybase - public

Keybase proof

I hereby claim:

  • I am materemias on github.
  • I am materemias (https://keybase.io/materemias) on keybase.
  • I have a public key whose fingerprint is 0AB9 220B E723 7943 BAC9 FE64 B490 10DE 4C39 0922

To claim this, I am signing this object: