Skip to content

Instantly share code, notes, and snippets.

View ozkatz's full-sized avatar

Oz Katz ozkatz

View GitHub Profile
@ozkatz
ozkatz / basha256.sh
Created June 29, 2026 22:35
A pure-bash implementation of sha256. Why? because we can.
#!/usr/bin/env bash
#
# basha256.sh - sha256 in pure Bash 3.2
#
# ./basha256.sh < bigfile.bin
#
# Everything below: the message schedule, the compression function and even
# reading the raw bytes off stdin is done with nothing but Bash builtins and arithmetic.
#
# TIL: Bash cannot store a NUL byte in a variable, so stdin is read in NUL-delimited chunks and the delimiters are re-inserted by hand.
@ozkatz
ozkatz / lakefs_resolver.py
Created February 19, 2021 18:20
lakeFS python resolver (returns S3 addresses for objects under a prefix)
#!/usr/bin/env python
from urllib.parse import urlparse
from typing import Iterator
from bravado.requests_client import RequestsClient
from bravado.client import SwaggerClient
class lakeFSResolver(object):
"""
An example lakeFS client that allows resolving
@ozkatz
ozkatz / cla.txt
Created August 2, 2020 15:55
lakeFS CLA
lakeFS Individual Contributor License Agreement
Adapted from http://www.apache.org/licenses/ © Apache Software Foundation
Thank you for your interest in lakeFS (the "Foundation"). In order to clarify the intellectual property license granted with Contributions from any person or entity, the Foundation must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of the Foundation and its users; it does not change your rights to use your own Contributions for any other purpose. If you have not already done so, please complete and sign, then scan and email a pdf file of this Agreement to hello@treeverse.io
Please read this document carefully before signing and keep a copy for your records.
You accept and agree to the following terms and conditions for Your present and future Contributions submitted to the Foundation. In return, the Foundation
### Keybase proof
I hereby claim:
* I am ozkatz on github.
* I am ozk (https://keybase.io/ozk) on keybase.
* I have a public key whose fingerprint is 1AB0 E63A 96C0 217D 04EB 70A7 71DF 2351 5439 C3A1
To claim this, I am signing this object:
@ozkatz
ozkatz / ec2_ssh_config.py
Created June 21, 2013 00:50
generate an ~/.ssh/config file from your EC2 instances, so that you'd never have to lookup those fugly ec2-xx-xx-xx-xxx.compute-1.amazonaws.com hostnames again. Use your instance name instead!
#!/usr/bin/env python
import os
import sys
import argparse
try:
from boto.ec2.connection import EC2Connection
except ImportError:
sys.stderr.write('Please install boto ( http://docs.pythonboto.org/en/latest/getting_started.html )\n')
sys.exit(1)