- 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
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
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/ |
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]); |
Chose between natural mode like MacOS or Windows default mode.
You can do this by going to Start Menu, type PowerShell, and click Run as Administrator.
$mode = Read-host "How do you like your mouse scroll (0 or 1)?"; Get-PnpDevice -Class Mouse -PresentOnly -Status OK | ForEach-Object { "$($_.Name): $($_.DeviceID)"; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters" -Name FlipFlopWheel -Value $mode; "+--- Value of FlipFlopWheel is set to " + (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters").FlipFlopWheel + "`n" }
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"); | |
const net = std.net; | |
const fs = std.fs; | |
const os = std.os; | |
pub const io_mode = .evented; | |
pub fn main() anyerror!void { | |
var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){}; | |
const allocator = general_purpose_allocator.allocator(); |
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
// Build: zig build-exe -O ReleaseFast --strip src/main.zig | |
// Run: zig build run -- -w 70 -h 40 -m "*" -s 0.07 -c 25 | |
// Version: 0.10.0-dev.3475+b3d463c9e | |
// Date: 2022/08/08 | |
const std = @import("std"); | |
const mem = std.mem; | |
const fmt = std.fmt; | |
const os = std.os; |
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
/* | |
* André Staltz (@andrestaltz): You will learn RxJS at ng-europe 2016 | |
* https://www.youtube.com/watch?v=uQ1zhJHclvs | |
*/ | |
function map(transformFn) { | |
const inputObservable = this; | |
const outputObservable = createObservable(function subscribe(outputObserver) { | |
inputObservable.subscribe({ | |
next: function(x) { |
Nvm does not work in vscode tasks, because tasks are run without a shell. .bashrc
is not loaded and the nvm command is unknown.
My solution uses a wrapper script around /bin/bash
that reads in the correct node version from .npmrc
in the project folder.
#!/bin/bash
set -e
if [[ "$2" == nvm* ]]; then
export NODE_VERSION=v$(cat .nvmrc)
NewerOlder