Skip to content

Instantly share code, notes, and snippets.

View kind3r's full-sized avatar

Emanuel Posescu kind3r

  • DacodaSoft
  • Bucharest
View GitHub Profile
@kind3r
kind3r / getProgramAccounts.ts
Created June 24, 2023 21:00
Streamable version of Solana's getProgramAccounts
import { Program } from "@project-serum/anchor";
import { Connection } from "@solana/web3.js";
import PQueue from "p-queue";
import delay from "delay";
import fetch from "node-fetch";
import { parser } from 'stream-json';
import { pick } from "stream-json/filters/Pick";
import { ignore } from "stream-json/filters/Ignore";
import { streamArray } from "stream-json/streamers/StreamArray";
@kind3r
kind3r / ledgerWallet.ts
Created June 21, 2023 11:32
LedgerWallet
import { Keypair, PublicKey, Transaction } from "@solana/web3.js";
import TransportNodeHid from "@ledgerhq/hw-transport-node-hid";
import Solana from "@ledgerhq/hw-app-solana";
import { Wallet } from "@project-serum/anchor/dist/esm/provider";
export class LedgerWallet implements Wallet {
public publicKey: PublicKey;
public payer: Keypair;
private ledgerPath: string;

Keybase proof

I hereby claim:

  • I am kind3r on github.
  • I am kind3r (https://keybase.io/kind3r) on keybase.
  • I have a public key ASA482Jzc1wYgF9Sr1OdDE9yunRonUuIrTGrvfFfDAItBgo

To claim this, I am signing this object:

@kind3r
kind3r / cast_lovelace_to_google_hub.yaml
Created December 25, 2020 07:12
Cast and re-cast a lovelace view to a Google Hub
blueprint:
name: Cast to Google Hub
description: 'Cast a lovelace view to a Google Hub.
This tries to bypass the 10 min timeout for the picture frame
by re-casting every 9 min'
domain: automation
input:
player:
name: Google Hub
description: Google Hub or Chromecast device to cast to
@kind3r
kind3r / Prusa Slicer Startup.gcode
Last active November 10, 2023 03:40
3D Printer start G-code for Prusa Slicer
M104 S150 ; start heating the extruder a bit to save some time but prevent oozing
M140 S[first_layer_bed_temperature] ; heatbed temperature
M190 S[first_layer_bed_temperature] ; wait for the bed to heat up
M83 ; extruder relative mode
G28 ; home all axes
G29 ; Bed autolevel (optional, for BLTouch only)
G92 E0 ; reset extruder
G1 X0 Y0 F5000 ; move to 0/0/0
G1 Z0