Skip to content

Instantly share code, notes, and snippets.

View nathanleclaire's full-sized avatar
Cooking up great code

Nathan LeClaire nathanleclaire

Cooking up great code
View GitHub Profile
id: 8854c0fe-1367-4a83-8632-6193d2a20609
name: traces
python_version: 3.11
diff --git a/Anchor.toml b/Anchor.toml
index 9bf3ac1..9e62d44 100644
--- a/Anchor.toml
+++ b/Anchor.toml
@@ -2,7 +2,7 @@
seeds = false
-karma = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"
+karma_token = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"
(async () => {
const startBlock = 117416695;
const blocks = range(startBlock, startBlock + 100000);
let fees = 0;
for (const i of blocks.values()) {
try {
const solConn = new sol.Connection(

with cli tools:

$ solana airdrop 1 --url localhost
Requesting airdrop of 1 SOL
Error: airdrop request failed. This can happen when the rate limit is reached.

rpc logs:

$ solana-keygen new --outfile ~/my-solana-wallet/my-keypair2.json
Generating a new keypair

For added security, enter a BIP39 passphrase

NOTE! This passphrase improves security of the recovery seed phrase NOT the
keypair file itself, which is stored as insecure plain text

BIP39 Passphrase (empty for none): thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 6, kind: Other, message: "The handle is invalid." }', keygen\src/
nathanleclaire /
Created June 27, 2021 01:08
Encode YouTube compatible video file of just one image with audio using ffmpeg

Trying to crank out a video which is:

  1. YouTube compatible
  2. Small-ish
  3. Preserves lossless audio
  4. Doesn't crash VLC, etc. (this happened embedding a FLAC direct in a WMV)
  5. Encodes as quickly as possible

So far, the best I've come up with is as follows:

Span span = tracer.scopeManager().activeSpan();
span.setAttribute("metric_name", "metric_value");
#Import Requirements-----------------------------------------------------------
from arch import arch_model
import datetime as dt
from datetime import datetime, timedelta
import pandas as pd
from yahoo_fin import stock_info as si
#Set Date Range----------------------------------------------------------------
start = dt.datetime(2000,1,1)
var http = require('http');
var beeline = require('honeycomb-beeline')({
writeKey: "key",
dataset: "nathanleclaire.nodejsbeelinetest",
serviceName: "frameworks-are-bloated-http-directly-rules"
//create a server object:
http.createServer(function (req, res) {
let trace = beeline.startTrace();
nathanleclaire / Dockerfile
Last active July 17, 2020 21:02
Secure Tenancy on Kubernetes
FROM debian:stretch-slim
RUN mkdir -p /srv/hny && \
apt-get update && \
apt-get install -y ca-certificates openssl bzip2
WORKDIR /srv/hny
# Need to build with tarball (provided by HNY team) adjacent in docker build directory
COPY st.tbz st.tbz
RUN tar --strip-components 1 -xjf st.tbz && \