Skip to content

Instantly share code, notes, and snippets.

View kalmanolah's full-sized avatar

Kalman Olah kalmanolah

View GitHub Profile
@kalmanolah
kalmanolah / haste.py
Last active December 8, 2021 21:47
Simple python script for putting things on hastebin. The resulting hastebin URL is copied to your primary clipboard using xsel. Usage: `cat yourfile.txt | haste`, `haste yourfile.txt`, 'haste` or `haste --clip`. `haste --help` for help.
#!/usr/bin/env python3
# @python3
# @author Kalman Olah <hello@kalmanolah.net>
"""A hastebin CLI tool."""
import click
import json
import requests
import subprocess
import sys