Hacker GitHub

← All repos

shawwn/scrap

View on GitHub ↗ ★ 136 Python

Nearly a thousand bash and python scripts I've written over the years.

7 mentions on Hacker News by 1 person: 0 stories, 7 comments · first 2020-02-01 · latest 2026-07-22

Mentions per year 7 mentions · busiest year 2020 (3)
20082026
  1. …Specifically, I serve the model with this shell script on my M2 Max: https://github.com/shawwn/scrap/blob/master/llama-serve It's pretty good. I used it to do some pesticide research. (Normal models all refuse due to guardrails
  2. If you throw this script into your PATH, you can write: $ math ‘5510^9 (3.17*10^-8)’ 1743.5000 https://github.com/shawwn/scrap/blob/master/math It’s a wrapper around bc, but it’s one of my most-used scripts. Doing some quick math in the…
  3. Amusingly, I apparently added these to scrap https://github.com/shawwn/scrap many years ago. I named them 1st, 2nd, 3rd, and 4th. So I guess I never needed to count to 5, but I'm still two ahead of Valve.…
  4. …my own script: I'm proud to present the most useful, least-work script I've ever written: `math` https://github.com/shawwn/scrap/blob/master/math #!/bin/sh scale=4 # results will print to the 4th decimal echo "scale=$scale; $@" | bc -l It…
    comment by sillysaurusx · 2021-12-23 · in SpeedCrunch
  5. …modifications. If you want to convert .epub files to .txt for your own use, the script is here: https://github.com/shawwn/scrap/blob/master/epub2txt-all It has a rather cryptic name of "epub2txt-all". Sorry about that. But the script…
    comment by sillysaurusx · 2020-10-25 · in Books in .txt format for AI training purposes
  6. …information is available to you. I suggest you try it before dismissing the idea, as I once did. https://github.com/shawwn/scrap is what I use. `codefiles | grep js$ | xargs merge | ft js` will open all javascript codefiles in vim, in JS…
  7. Ok, go ahead and port all 200 of these scripts to Python please: https://github.com/shawwn/scrap PR's welcome. ;) Python makes sense for scripts that need good argument parsing, or complicated intermediate input processing. But it's pretty…
    comment by sillysaurusx · 2020-02-01 · in Writing Safe Shell Scripts (2019)