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
M15 {KC_RGUI,KC_0}
yangwao /
Created April 18, 2023 20:09 — forked from itod/
Every "split" mechanical keyboard currently being sold that I know of
10:03:23 ❯ brew install julia-nightly
add Plots
add JSON
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 = /\/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(
yangwao /
Last active February 4, 2022 13:37
### How to connect ipad as secondary display at Monterey
### Connect Side Car on Monterey
### Author
### Open script editor and save as app
### Don't forget to add permisions in privacy window to controll it
### Original Source
### 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 >
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 /
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
tell application "System Preferences"
set the current pane to pane id ""
delay 0.3 #needs time to open universal access
tell application "System Events" to tell process "System Preferences" to tell window "Accessibility"
20:44:20 ❯ cat
osascript sidecar.scpt
20:44:22 ❯ cat sidecar.scpt
#!/usr/bin/env osascript
set controlCenterName to "Control Centre"
set connectToSidecarName to "Connect to Sidecar"

On Feb. 21, 2010, a con­voy of vehicles car­ry­ing ci­vil­ians headed down a moun­tain in cent­ral Afgh­anistan. Amer­ic­an eyes were watch­ing. For more than four hours, the U.S. mil­it­ary — in­clud­ing a Pred­at­or drone crew in Nevada, video screen­ers in Flor­ida, an AC-130 air­plane crew in the sky and an Amer­ic­an spe­cial op­er­a­tions unit on the ground nearby — tracked the con­voy, try­ing to de­cide wheth­er it was friend or foe. This is the of­fi­cial U.S. mil­it­ary tran­script of the ra­dio trans­mis­sions and cock­pit con­ver­sa­tions that day, ob­tained by the Los Angeles Times through a Free­dom of In­form­a­tion Act re­quest.

This is a cleaned up copy of the transcript obtained by the LA Times, retrieved from

I downloaded the PDF, ran pdf2txt on it, ran the following Python program to clean it up, then did manual edits.

import sys
yangwao /
Last active February 1, 2021 15:17 — forked from vikiival/
Price of Edgeware for last 30 days
from pycoingecko import CoinGeckoAPI
import datetime
from statistics import median, mean
cg = CoinGeckoAPI()
def main():
numdays = 30
base =
date_list = [base - datetime.timedelta(days=x) for x in range(numdays)]
fn_format = lambda x: x.strftime("%d-%m-%Y")