Skip to content

Instantly share code, notes, and snippets.

View yangwao's full-sized avatar
🥋
Mastering the code

Matej yangwao yangwao

🥋
Mastering the code
View GitHub Profile
@yangwao
yangwao / grayscale.app
Last active December 10, 2021 14:33
activate remove boring windows for humans
### Open script editor and save as app
### dont forget to add permisions in privacy window to controll it
### ht vikiival for evening cracking
### delay is might tricky!
### credits goes to https://gist.github.com/silesky/2da3a6bef1703e38d901ec9c623eecbd
tell application "System Preferences"
set the current pane to pane id "com.apple.preference.universalaccess"
delay 0.3 #needs time to open universal access
tell application "System Events" to tell process "System Preferences" to tell window "Accessibility"
set controlCenterName to "Control Centre"
set connectToSidecarName to "Connect to Sidecar"
set iPadName to "Magnetic tunnel"
tell application "System Events"
tell application process "ControlCenter"
set controlCenterIcon to (menu bar item controlCenterName of menu bar 1)
click controlCenterIcon
if not (exists (window controlCenterName)) then
@yangwao
yangwao / sidecar_monterey.app
Last active February 4, 2022 13:37
sidecar_monterey.app
### How to connect ipad as secondary display at Monterey
### Connect Side Car on Monterey
### Author https://twitter.com/yangwao
### https://github.com/yangwao
### Open script editor and save as app
### Don't forget to add permisions in privacy window to controll it
### Original Source https://www.reddit.com/r/MacOS/comments/il8x0y/is_it_possible_to_automatically_connect_to/g3tlhxc/
### Missing to check for accidental glitches if ipad is connected, but not showing display, yeah happen so something that would cycle would be warm welcome
### You need allow permission in Security & Privacy > Accessibility > your_script_name.app
@yangwao
yangwao / hazmatsuite.js
Created January 24, 2022 14:13
RegExp Kusama Address
// match Substrate/KSM address, experimental
// Warning: Do not use regular expressions (regex) to validate addresses.
// Always verify using the prefix and checksum of the address.
// Substrate API Sidecar provides an accounts/{accountId}/validate path that returns a boolean isValid response for a provided address.
// If you want to validate addresses in another way, see the validation documentation.
const lookupForAddress = /kodadot.xyz\/transfer\/\?target=\w[a-zA-Z0-9]{46}\b/g;
const matchAddress = /\w[a-zA-Z0-9]{46}\b/g;
const destination_address = matchAddress.exec(lookupForAddress.exec(pr_status.data.body))
10:03:23 ❯ brew install julia-nightly
]
add Plots
add JSON
include("threeBodyProb.jl")
main(custom=true)
@yangwao
yangwao / split_keyboards.md
Created April 18, 2023 20:09 — forked from itod/split_keyboards.md
Every "split" mechanical keyboard currently being sold that I know of
M4 {+KC_LALT}{+KC_LGUI}{+KC_LEFT}{-KC_LALT}{-KC_LGUI}{-KC_LEFT}
M5 {+KC_LALT}{+KC_LGUI}{+KC_RGHT}{-KC_LALT}{-KC_LGUI}{-KC_RGHT}
M6 {KC_LCTL,KC_LGUI,KC_SPC}
M13 {KC_LGUI,KC_MINS}
M14 {KC_LGUI,KC_EQL}
M15 {KC_RGUI,KC_0}