Skip to content

Instantly share code, notes, and snippets.

@eguven
eguven / brew-list.sh
Last active June 30, 2024 14:40
List all packages installed using Homebrew and their sizes
# this original one uses values returned from 'brew info'
brew list --formula | xargs -n1 -P8 -I {} \
sh -c "brew info {} | egrep '[0-9]* files, ' | sed 's/^.*[0-9]* files, \(.*\)).*$/{} \1/'" | \
sort -h -r -k2 - | column -t
# faster alternative using 'du'
du -sch $(brew --cellar)/*/* | sed "s|$(brew --cellar)/\([^/]*\)/.*|\1|" | sort -k1h
@sundayguru
sundayguru / gist:c370211bad2f45d155c7e7a139aed431
Last active April 30, 2021 08:37
'libmemcached/memcached.h' file not found error
Error: src/_pylibmcmodule.h:42:10: fatal error: 'libmemcached/memcached.h' file not found
#include <libmemcached/memcached.h>
^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
Solution:
brew install libmemcached

Minecraft on Apple Silicon

In this gist, you can find the steps to run Minecraft 1.16.4 natively on Apple Silicon (AS), without needing Rosetta 2 translation of the dependencies (mainly LWJGL and related libraries).

While it's possible to use a launcher like MultiMC to have a prettier way to run the game on AS, it requires installing even more dependencies (like QT) which take time and are difficult to distribute. Therefore, I've put together a command line-based launcher tool using a couple shell & Python scripts.

To get up and running quickly, follow the steps below. Otherwise, for more detail, watch my YouTube video.

Download my package