Skip to content

Instantly share code, notes, and snippets.

View yuvve's full-sized avatar

yuvve

  • Sweden
  • 07:56 (UTC +02:00)
View GitHub Profile
@yuvve
yuvve / transfer.m
Last active May 1, 2024 18:06
MATLAB transfer function information
%% Transfer function information
% This script takes either polynomial coefficients for the numerator and denominator
% OR zero and pole locations (factorized roots) + gain
% of the transfer function of a system, and then returns:
% 1. A graph of system's impulse response.
% 2. A graph of the system's step response.
% 3. The pole-zero diagram of the system.
% 4. The factorized transfer function printed with LaTeX.
% 5. The transfer function printed with LaTeX.
% 6. The partial fraction decomposition of the transfer function printed
@yuvve
yuvve / MullvadAdGuardAndroidRooted.md
Last active January 24, 2024 20:55
How to use AdGuard ad filtering capability together with Mullvad VPN on a rooted Android device

AdGuard ad filtering + Mullvad VPN

Sources

Steps

  1. Open AdGuard and go to Apps → Mullvad VPN → Disable routing through AdGuard.
  2. (In AdGuard) go to Settings → Filtering → Network → Routing Mode and choose Automatic Proxy.
  3. (In AdGuard) and go to Settings → Filtering → Network → Proxy → Proxy server.
  4. Tap the Add proxy server and fill in the fields:
@yuvve
yuvve / diffisar.md
Last active January 21, 2023 12:53
Diffisar M0049M

Differentialekvationer (M0049M) 2022-10-21 09 55 47 excalidraw

@yuvve
yuvve / Obsidian Git-Mobile.md
Last active March 31, 2024 18:15
Automatically sync notes to and from git repository whenever you open and close Obsidian on mobile.

How to automatically sync Obsidian between Github and Android with Termux and Tasker

I use Obsidian git on PC, and this workaround (since the plugin doesn't support mobile) to seamlessly* sync my notes to and from my phone. Using these instructions you create an automation for pulling every time you open Obsidian, and pushing every time you close it.

* you can still get merge conflicts...

Preparation

  1. Install Tasker.
  2. Install Termux.
  3. Install Termux tasker plugin.
  4. Open Termux and write termux-setup-storage, give it permissions.
@yuvve
yuvve / MIPS_bit_splitter.py
Created May 23, 2022 17:55
Makes it easier to read machine code by splitting the bits depending on the MIPS instruction
def i_type(s):
op = s[0:6]
rs = s[6:11]
rt = s[11:16]
imm = s[16:]
return f"{op} {rs} {rt} {imm}"
def r_type(s):
op = s[0:6]
rs = s[6:11]
@yuvve
yuvve / obsidian_anki_regex_clipboard.py
Last active March 31, 2023 09:31
Takes Obsidian formatted string from clipboard and replaces it with Anki formatted string
import re, pyperclip
# Changes
# $...$ to \(...\)
# $$...$$ to \[...\]
# [[a|b]] to b
# }} to } }
# *abcd* to <i>abcd</i>
# **abcd** to <b>abcd</b>
# markdown bulleted lists (using -) to html <ul>...</ul>
@yuvve
yuvve / UML_lathund.md
Last active March 12, 2024 20:17
UML lathund

lathund