This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { describe, expect, it } from "bun:test"; | |
| describe.skipIf(SKIP)("Aerodrome SDK Direct - Integration", () => { | |
| const SDK_TIMEOUT = 60_000; | |
| it("calls getQuoteForSwap directly for USDC -> WETH", async () => { | |
| const { getDefaultConfig, getQuoteForSwap, base } = await import("@dromos-labs/sdk.js"); | |
| const config = getDefaultConfig({ | |
| chains: [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done | |
| # Add Docker's official GPG key: | |
| sudo apt-get update | |
| sudo apt-get install ca-certificates curl | |
| sudo install -m 0755 -d /etc/apt/keyrings | |
| sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc | |
| sudo chmod a+r /etc/apt/keyrings/docker.asc | |
| # Add the repository to Apt sources: | |
| echo \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Depends on terminal-notifier -> https://github.com/julienXX/terminal-notifier | |
| # Setup Details: | |
| # Save this as a bash file | |
| # [in claude code] Call /hooks | |
| # Select STOP | |
| # Paste fully qualified path of bash file | |
| json=$(cat) | |
| cwd=$(printf '%s' "$json" | jq -r '.cwd // .tool_input.cwd // empty') | |
| [ -z "$cwd" ] && cwd="(no cwd field)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Implementation of SHA-256 mapping a byte array of variable length to | |
| // 32 bytes. | |
| use dep::std::hash; | |
| // Convert 64-byte array to array of 16 u32s | |
| fn msg_u8_to_u32(msg: [u8; 64]) -> [u32; 16] { | |
| let mut msg32: [u32; 16] = [0; 16]; | |
| for i in 0..16 { | |
| for j in 0..4 { | |
| msg32[15 - i] = (msg32[15 - i] << 8) + msg[64 - 4*(i + 1) + j] as u32; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Github url parser in python - @alpinevm | |
| Inspired by https://github.com/jonschlinkert/parse-github-url/tree/master | |
| """ | |
| from typing import Union, Optional | |
| from urllib.parse import urlparse | |
| import re | |
| from dataclasses import dataclass | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| python3 -m pip install web3 requests | |
| """ | |
| import subprocess | |
| import socket | |
| from web3 import Web3, HTTPProvider | |
| from web3.types import Wei | |
| import time | |
| import requests | |
| import traceback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Author: Alpine, @alpinevm | |
| # python3 -m pip install eth_account ecdsa | |
| # Inspired by: https://yondon.blog/2019/01/01/how-not-to-use-ecdsa/ | |
| import random | |
| from eth_account import Account | |
| from ecdsa import SECP256k1, VerifyingKey | |
| from ecdsa.util import number_to_string |