Skip to content

Instantly share code, notes, and snippets.

View ksolana's full-sized avatar

asolana ksolana

View GitHub Profile
@ksolana
ksolana / coin_gecko_stake_price.py
Created April 15, 2024 16:55
coin_gecko_stake_price.py
import requests
import pandas as pd
from datetime import datetime
from dateutil import parser
import time
def datetime_parse(dt_string):
#dt_string example: "December 30, 2023 13:06:57 UTC"
dt = parser.parse(dt_string).timestamp()
return dt
@ksolana
ksolana / lang-rust.md
Last active March 23, 2024 15:02
Developing Solana with rust
@ksolana
ksolana / BTF-verifier-starter-notes.md
Last active January 24, 2024 05:11
BTF-verifier-starter-notes

Fedora Installation of btftool:

$ sudo dnf install elfutils-libelf-devel
Build btftool
$ git clone --recurse-submodules https://github.com/libbpf/bpftool.git
$ cd src && make

On Mac just use the multipass and install btftool inside the VM. Look for multipass references at the end of the gist.

@ksolana
ksolana / test-bpf-type-id.md
Last active September 28, 2023 14:50
test-bpf-type-id.c btf section
typedef long long uint64_t;

uint64_t test1(uint64_t a) { return __builtin_btf_type_id(a, 0); }
uint64_t test2(uint64_t a) { return __builtin_btf_type_id(&a, 0); }

struct t1 { uint64_t a; };
typedef struct t1 __t1;

unsigned test3() {