Skip to content

Instantly share code, notes, and snippets.

version: '3.6'
volumes:
zookeeper-data:
driver: local
zookeeper-log:
driver: local
kafka-data:
driver: local
@igorvoltaic
igorvoltaic / arm64-linux-qemu-mac-m1.md
Last active July 17, 2023 18:27
QEMU (7.1.0) Virtualisation Examples on Mac M1

arm64 Linux VM on Mac M1 using QEMU

INSTALLATION

qemu-system-aarch64 \
    -cpu max -m 8G \
    -machine virt,accel=hvf \
    -M q35 \
    -smp 4,sockets=1,cores=4,threads=1 \
@igorvoltaic
igorvoltaic / Python36-on-macbook-m1.sh
Last active December 23, 2021 22:42
Step-by-step Python 3.6.x installation process on Apple Macbook M1 with Mac OS X Big Sur
# 0. [OPTIONAL] In case: `Error: Failed to link all completions, docs and manpages: Permission denied @ rb_file_s_symlink`
sudo chown -R $(whoami) /usr/local/share/zsh
# 1. Install x86_64 Homebrew version:
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# 2. In case `brew --prefix` is not `/usr/local` run this (for zsh) and restart the terminal:
echo 'export PATH="/usr/local/bin/:/usr/local/sbin:$PATH"' >> ~/.zshrc
@igorvoltaic
igorvoltaic / debian-xhyve.sh
Last active October 29, 2020 05:01 — forked from lloeki/debian-xhyve.sh
Running debian 8.1 in xhyve
#!/bin/bash
# debian in xhyve
img_name="@1"
tmp=$(mktemp -d)
pushd "$tmp"
iso="$HOME"/Downloads/$img_name
echo "fixing disk"
@igorvoltaic
igorvoltaic / useradd.sh
Last active March 8, 2024 09:36
Create new user using command line in Mac OS X. Do not forget to set correct permissions for the file.
#!/bin/sh
if [[ `id -u` != 0 ]]; then
echo "Must be root to run script"
exit
fi
read -p "Enter user name and press [ENTER]: " UserName
if [[ $UserName == `dscl . -list /Users UniqueID | awk '{print $1}' | grep -w $UserName` ]]; then