Skip to content

Instantly share code, notes, and snippets.

@dsherret
dsherret / Using.ts
Last active October 26, 2023 13:30
Typescript Disposable (using statement)
// NOTE: This is now rolled up in a package and supports more scenarios: https://github.com/dsherret/using-statement
interface IDisposable {
dispose();
}
function using<T extends IDisposable>(resource: T, func: (resource: T) => void) {
try {
func(resource);
} finally {
@bloqhub
bloqhub / gist:ba04d09891bd59c21d9ff228eefadb62
Created October 29, 2021 15:15
Stargaze cosmovisor setup
0. Upgrade node to resease 1.0.0 Using docs:
https://github.com/public-awesome/mainnet/tree/main/stargaze-1
1. setup cosmovisor
cd ~
git clone https://github.com/cosmos/cosmos-sdk
cd cosmos-sdk
git checkout v0.42.7