Skip to content

Instantly share code, notes, and snippets.

View arubin's full-sized avatar

Amir Rubin arubin

  • Techshido
  • Portland, OR
View GitHub Profile
@sts10
sts10 / rust-command-line-utilities.markdown
Last active May 10, 2024 07:57
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@oshea00
oshea00 / kabsch.py
Last active April 4, 2024 04:51
3D best-fit using Kabsch algorithm
import numpy as np
from math import sqrt
scaling = False
# Implements Kabsch algorithm - best fit.
# Supports scaling (umeyama)
# Compares well to SA results for the same data.
# Input:
# Nominal A Nx3 matrix of points
@peter-jung
peter-jung / applescript_from_mac.py
Created February 22, 2017 09:28
How to call an Applescript from Python on Mac?
import subprocess, sys
applescript='''
tell application "System Events"
set processName to name of processes whose frontmost is true
do shell script "echo " & processName
end tell
'''
args = [item for x in [("-e",l.strip()) for l in applescript.split('\n') if l.strip() != ''] for item in x]
proc = subprocess.Popen(["osascript"] + args ,stdout=subprocess.PIPE )
progname = proc.stdout.read().strip()
@wngreene
wngreene / bag_to_images.py
Last active May 2, 2024 05:14
Extract images from a rosbag.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2016 Massachusetts Institute of Technology
"""Extract images from a rosbag.
"""
import os
import argparse
@afternoon
afternoon / git-slim.py
Created December 5, 2011 14:42
Remove large objects from a git repository
#!/usr/bin/python
#
# git-slim
#
# Remove big files from git repo history.
#
# Requires GitPython (https://github.com/gitpython-developers/GitPython)
#
# References:
# - http://help.github.com/remove-sensitive-data/