Skip to content

Instantly share code, notes, and snippets.

View azhang's full-sized avatar
🚀
🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀

Allie azhang

🚀
🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀
View GitHub Profile
# EVM
DOMAIN-SUFFIX,etherscan.io
DOMAIN-SUFFIX,zapper.fi
DOMAIN-SUFFIX,arbiscan.io
DOMAIN-SUFFIX,ethernow.xyz
DOMAIN-SUFFIX,blockscout.com
DOMAIN-SUFFIX,ethplorer.io
DOMAIN-SUFFIX,polygonscan.com
DOMAIN-SUFFIX,chainlens.com
DOMAIN-SUFFIX,etherchain.org
@azhang
azhang / sonokai.theme
Created November 13, 2023 23:53
sonokai.theme
--[[ 2023/11/13 | Lua 5.3
Based on https://github.com/sainnhe/sonokai.
Useful for https://github.com/sbarex/SourceCodeSyntaxHighlight and other things that use highlight themes.
------------------------------------------------------------------------------]]
Description="Sonokai"
Categories = {"dark"}
--------------------------------------------------------------------------------
@azhang
azhang / monokai.theme
Created November 13, 2023 23:52
non base 16 monokai.theme
--[[ 2018/06/17 | Highlight v3.43 | Lua 5.3
================================================================================
Scheme: "Monokai"
Author: Allie
License: MIT License
Source:
------------------------------------------------------------------------------]]
Description = "Monokai"
Categories = {"dark", "lsp"}
@azhang
azhang / rock_owners.js
Last active September 4, 2021 04:42
get rock owners 😂
// run this in inspector
var howMany = 1000
const ABI = JSON.parse('[{"constant":false,"inputs":[{"name":"rockNumber","type":"uint256"},{"name":"receiver","type":"address"}],"name":"giftRock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"uint256"}],"name":"rockOwners","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"rockNumber","type":"uint256"}],"name":"dontSellRock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"rockNumber","type":"uint256"}],"name":"buyRock","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"rocks","outputs":[{"name
@azhang
azhang / pxe_on_opnsense.md
Last active July 31, 2024 12:52
PXE on OPNsense

This is a walkthrough of setting up a PXE server to boot Ubuntu server live install .iso over network, all on an OPNsense device. No need for Dnsmasq or http/nfs server! Should be compatible with vanilla FreeBSD and HardenedBSD devices as well.

Guide made with OPNsense 20.7 and Ubuntu 20.04.2, with the assumption that your OPNsense device is at 192.168.1.1.

Thanks to all the other guides out there. 1 2

Notes:

A couple issues I ran into with other guides is that Ubuntu's servers return 404 for older releases. Make sure to check each link used in this guide to make sure they exist! This guide works with BIOS as we use pxelinux.0 but it can be adapted fairly easily for UEFI boot.

Overview:

@azhang
azhang / get_all_go_types.sh
Created May 27, 2020 07:07
grep all types in golang repo
rg --multiline --multiline-dotall --type=go "^type [a-zA-Z]* struct([^\n]*}|.*?^})"
@azhang
azhang / install_talib_python37.sh
Created February 12, 2020 23:29
Installing ta-lib for python 3.7
brew install ta-lib
git clone --depth 1 --branch master [email protected]:mrjbq7/ta-lib.git
cd ta-lib
python setup.py install
@azhang
azhang / install_quantconnect.zsh
Created February 10, 2020 04:16
quantconnect lean installation on mac
#!/bin/zsh
brew install anaconda
/usr/local/anaconda3/bin/conda init zsh
. ~/.zshrc
# create new conda env
conda create --name lean
conda activate lean
0426092318880254c6f1bc7400a0b2e8765874ca8cbe0df829e0e06a9e7f8b4b27b5c520a5fae97e78f29ce8b131bb3610ce3d1675a5741c510471b2c9ff425220;etartakovsky
@azhang
azhang / prepare-commit-msg
Created May 16, 2017 21:25
Prepare-commit-msg hook for Whisper
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"