Skip to content

Instantly share code, notes, and snippets.

View SerJaimeLannister's full-sized avatar

LanguageNest SerJaimeLannister

View GitHub Profile
import base36
import textwrap
import subprocess
import re
import argparse
# Argument parsing
parser = argparse.ArgumentParser(description="Generate nano vanity addresses and extract original string.")
parser.add_argument("--string", required=True, help="The input string to process (e.g., 'keshav').")
parser.add_argument("--length", type=int, required=True, help="Length of segments for text wrapping.")
Haven't decided the license yet so probably don't use it right away in your project ?
Maybe I am thinking of creating a fork since creating the core functionality was rather trivial.
<script lang="ts">
import { onMount } from 'svelte';
import Highlight from 'svelte-highlight';
import { d } from 'svelte-highlight/languages';
import javascript from 'svelte-highlight/languages/javascript';
import github from 'svelte-highlight/styles/github';
import githubDark from 'svelte-highlight/styles/github-dark';
import { red } from "@std/fmt/colors";
Deno.stdin.setRaw(true);
let chunk = new Uint8Array(0);
let currentInput = "";
let cursorPosition = 0;
const reader = Deno.stdin.readable.getReader();
while (true) {
if (chunk.length === 0) {
const readResult = await reader.read();
const decoder = new TextDecoder();
export async function* readStdin() {
for await (const chunk of Deno.stdin.readable) {
const text = decoder.decode(chunk, { stream: true });
const lines = text.split("\n");
for (const line of lines) {
if (line) {
yield line; // Yield each non-empty line
import { readStdin } from "./readlines.ts";
import { BlobTicket, Iroh } from "npm:@number0/iroh";
const prompt = 'Type a message to share (or "exit" to quit): ';
async function* inputLoop() {
for await (const line of readStdin()) { // Use the new readStdin generator
yield line; // Yield each line as it is read
}
}