Skip to content

Instantly share code, notes, and snippets.

@jmatsushita
jmatsushita / README
Last active May 13, 2024 18:21
Setup nix, nix-darwin and home-manager from scratch on an M1 Macbook Pro
###
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places.
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of
###. things to watch out for:
### - Check out the `nix-darwin` instructions, as they have changed.
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026
###
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs).
# So here's a minimal Gist which worked for me as an install on a new M1 Pro.
@ansemjo
ansemjo / container-systemd-autologin.conf
Created April 26, 2019 10:53
enable root autologin when starting a container with systemd init
# drop-in override to fix and enable autologin in rootless containers with systemd init
# e.g.:
#
# podman run --rm -it \
# -v .../container-systemd-autologin.conf:/etc/systemd/system/console-getty.service.d/override.conf:ro \
# centos:latest /usr/lib/systemd/systemd
[Service]
ExecStart=
ExecStartPre=-/usr/bin/sed -i '/pam_loginuid.so/d' /etc/pam.d/login
@BretFisher
BretFisher / docker-for-mac.md
Last active May 15, 2024 05:19
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 21, 2024 15:59
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname