Skip to content

Instantly share code, notes, and snippets.

# Use US layout with US variant
KEYMAPOPTS="us us"
# Set hostname to alpine
HOSTNAMEOPTS="-n alpine"
# Contents of /etc/network/interfaces
INTERFACESOPTS="auto lo
iface lo inet loopback
@0az
0az / Makefile
Created October 6, 2019 06:07
DSC40a Makefile
SOURCE_DOCS := $(sort $(wildcard hw*.md))
EXPORTED_DOCS := $(SOURCE_DOCS:.md=.pdf)
RM = /bin/rm
PANDOC = /usr/local/bin/pandoc
H_PGFPLOTS := dsc40a-pgfplots.tex
@0az
0az / gist:95757bc71c07fe4b313397f83713bcd9
Created October 20, 2019 18:46
Lila docker-compose logs
Attaching to docker_ingress_1, docker_builder-server_1, docker_mongodb_1, docker_redis_1
mongodb_1 | 2019-10-20T01:27:06.520+0000 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
mongodb_1 | 2019-10-20T01:27:06.532+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=59d0d4fdb432
mongodb_1 | 2019-10-20T01:27:06.532+0000 I CONTROL [initandlisten] db version v4.2.0
mongodb_1 | 2019-10-20T01:27:06.532+0000 I CONTROL [initandlisten] git version: a4b751dcf51dd249c5865812b390cfd1c0129c30
mongodb_1 | 2019-10-20T01:27:06.532+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.1.1 11 Sep 2018
mongodb_1 | 2019-10-20T01:27:06.533+0000 I CONTROL [initandlisten] allocator: tcmalloc
mongodb_1 | 2019-10-20T01:27:06.533+0000 I CONTROL [initandlisten] modules: none
mongodb_1
@0az
0az / gist:ab11b0fb997e30e8113fc88225a07bc9
Created October 20, 2019 21:29
Lila Docker builder-server logs
Attaching to docker_builder-server_1
builder-server_1 | [process_args] java_version = '8'
builder-server_1 | # Executing command line:
builder-server_1 | java
builder-server_1 | -Xms2048M
builder-server_1 | -Xmx4096M
builder-server_1 | -XX:ReservedCodeCacheSize=128m
builder-server_1 | -XX:+CMSClassUnloadingEnabled
builder-server_1 | -XX:+UseConcMarkSweepGC
builder-server_1 | -XX:+ExitOnOutOfMemoryError

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:

#! /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
# 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
@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'
}
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 / resume.md
Last active May 2, 2022 16:51
0az's Resume | Updated: 2021-08-05.