Skip to content

Instantly share code, notes, and snippets.

@0az
0az / README.md
Last active January 9, 2022 22:24
Don't reindent when commenting out existing lines

Installation

Add the contents of yaml.vim to $VIM/after/indent/yaml.vim.

@0az
0az / kn.ts
Created July 11, 2021 17:08
Single File replacement for the classnames package
type MaybeClassName = string | boolean | null | undefined | MaybeClassName[]
export const kn = (...args: MaybeClassName[]): string =>
args
.filter(e => e)
.flat()
// eslint-disable-next-line prefer-template
.map(e => e + '')
.join(' ')
export default kn
@0az
0az / download-zoom-vtt.user.js
Last active October 23, 2020 21:01
Add download link to Zoom Cloud Recordings' generated WebVTT.
// ==UserScript==
// @name Download Zoom VTT
// @author 0az
// @version 0.0.2
// @namespace https://github.com/0az
//
// @description Add download link to Zoom Cloud Recordings' generated WebVTT.
// @match *://*.zoom.us/rec/play/*
// @run-at document-idle
// @inject-into page

Alternate Poetry installation steps

  • Install Python 3.8, or the latest stable version of Python.
    • Depends on OS/Distro.
    • Windows: Use Windows Subsystem for Linux and Google.
    • Mac: Use Homebrew
    • Linux: I assume you know what you're doing.
  • Install pipx using pip.
    • python3 -m pip install --user pipx
  • If your Python 3.8 is installed under a different name, adjust accordingly.
@0az
0az / resume.md
Last active May 2, 2022 16:51
0az's Resume | Updated: 2021-08-05.
sudo tee /etc/systemd/system/restart-chromium.service <<EOF
[Unit]
Description=Restart Chrome
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'pkill -f chromium-browser && /usr/bin/chromium-browser > /dev/null'
EOF
sudo tee /etc/systemd/system/restart-chromium.timer <<EOF
@0az
0az / airport_ssid.sh
Created March 12, 2020 00:54
Print the current wireless network SSID to stdout
#! /bin/sh
airport_ssid() {
/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I \
| sed -nE 's/^[[:space:]]+[[:<:]]SSID:[[:space:]]+//p'
}
# Copyright (c) 2020, Andrew Zhou
# All rights reserved.
from __future__ import annotations
from aiosqlite import Connection as AConnection
from collections import OrderedDict
from inspect import Signature
from typing import Any, Callable, Generic, Optional, TypeVar
#! /usr/bin/env node
/*
* MIT License
*
* Copyright (c) 2020 Andrew Zhou
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell

Keybase proof

I hereby claim:

  • I am 0az on github.
  • I am 0az (https://keybase.io/0az) on keybase.
  • I have a public key whose fingerprint is F43F 1367 6C43 69DA 075F 38BC E8AA 4DE8 03ED 4820

To claim this, I am signing this object: