This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
fn splice(src_rd: anytype, dst_wr: anytype, comptime buf_len: usize, lim: usize) !void { | |
var buf: [buf_len]u8 = undefined; | |
var left = lim; | |
while (true) { | |
const len = try src_rd.read(buf[0..@min(left, buf.len)]); | |
if (len == 0) break; | |
left = try std.math.sub(usize, left, len); | |
try dst_wr.writeAll(buf[0..len]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o allexport | |
source .env | |
set +o allexport | |
cd webapp && npm run build && cd .. && | |
ssh ${SSH_USER}@${SSH_HOST} -p $SSH_PORT "mkdir -p /var/www/example.com/webapp" && | |
rsync -avzr --delete --filter=':- .gitignore' -e 'ssh -p '${SSH_PORT} webapp/dist/webapp/ ${SSH_USER}@${SSH_HOST}:/var/www/example.com/webapp/ |
The aim was to be able to:
- Run multiple Linux VMs on an Apple M1/ARM device
- Use Apple's HVF for native performance speeds
- Configure VMs to allow network access to each other
- Configure VMs to allow access to the internet
- Not rely on custom modifications of software
- To have switching with
alt+tab
and window previews, install https://formulae.brew.sh/cask/alt-tab. You may need to change in settingsalt+tab
toShow windows from applications: All apps
. - To have fast switching between fullscreen windows: don't fullscreen and just autohide top bar instead. You may also autohide dock. One downside if you move mouse to top bar and click to fast, you will show desktop instead. Threre is some possibility for fast switching with fullscreen windows with https://github.com/koekeishiya/yabai but is hacky.
- Install https://brew.sh. Disable qurantine with
export HOMEBREW_CASK_OPTS=--no-quarantine
in~/.zshrc
link. To upgrade packages without asking for root password many times https://github.com/rofrol/dotfiles/blob/master/bin/brew-update. To list brew packages https://github.com/rofrol/dotfiles/blob/master/bin/brew-packages. - Learn Finder shortcuts:
enter
to rena
OlderNewer