Skip to content

Instantly share code, notes, and snippets.

@jkoppel
jkoppel / Cooler.sol
Last active November 21, 2023 02:26
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import {SafeTransferLib} from "solmate/utils/SafeTransferLib.sol";
import {ERC20} from "solmate/tokens/ERC20.sol";
import {Clone} from "clones/Clone.sol";
import {IDelegate} from "interfaces/IDelegate.sol";
import {CoolerFactory} from "src/CoolerFactory.sol";
import {CoolerCallback} from "src/CoolerCallback.sol";
@jkoppel
jkoppel / gist:b1f97cd297ec500f11a0236cc6eecf3f
Created November 22, 2023 01:12
Experiments with section headings
############################# /*##########################\ -- ############################# --
############################# ############################# -- ############################# --
#### #### #### #### -- #### #### --
#### Section Heading #### #### Section Heading #### -- #### Section Heading #### --
#### #### #### #### -- #### #### --
############################# ############################# -- ############################# --
############################# \##########################*/ -- ############################# --
####################### /*###################*\ -- ####################### --
# # # # -- # # --
@jkoppel
jkoppel / gist:28fb6d4148866153711ac2ce1feab084
Created January 19, 2024 22:01
Error building trustfall
(venv) (base) [jkoppel@MacBook-Pro-173:tmp/trustfall]$ cargo build (01-19 04:53)
warning: output filename collision.
The lib target `trustfall` in package `trustfall v0.7.1 (/Users/jkoppel/tmp/trustfall/trustfall)` has the same output filename as the lib target `trustfall` in package `pytrustfall v0.1.6 (/Users/jkoppel/tmp/trustfall/pytrustfall)`.
Colliding filename is: /Users/jkoppel/tmp/trustfall/target/debug/libtrustfall.rlib
The targets should have unique names.
Consider changing their names to be unique or compiling them separately.
This may become a hard error in the future; see <https://github.com/rust-lang/cargo/issues/6313>.
Compiling demo-hytradboi v0.1.0 (/Users/jkoppel/tmp/trustfall/demo-hytradboi)
Compiling pytrustfall v0.1.6 (/Users/jkoppel/tmp/trustfall/pytrustfall)
# Lookup shell on explainshell
function explain() {
# Example url: http://explainshell.com/explain/tar?args=xzvf+archive.tar.gz
URL="http://explainshell.com/explain"
FIRST=0
for i; do
if [ $FIRST -eq 0 ]; then
URL="${URL}/$i?args="
FIRST=1
elif [ $FIRST -eq 1 ]; then