This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated from discussions in hashicorp/vagrant-vmware-desktop#22
First install Rosetta if not already done, this is needed to run x86 code:
| #!/bin/bash | |
| # 检查系统版本 | |
| if [ -f /etc/redhat-release ]; then | |
| OS_VERSION=$(grep -oE '[0-9]+\.[0-9]+' /etc/redhat-release) | |
| else | |
| echo "未找到 /etc/redhat-release 文件。请确保您运行的是 CentOS 系统。" | |
| exit 1 | |
| fi |
| #!/usr/bin/env bash | |
| echo=echo | |
| for cmd in echo /bin/echo; do | |
| $cmd >/dev/null 2>&1 || continue | |
| if ! $cmd -e "" | grep -qE '^-e'; then | |
| echo=$cmd | |
| break | |
| fi | |
| done |
This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated from discussions in hashicorp/vagrant-vmware-desktop#22
First install Rosetta if not already done, this is needed to run x86 code:
| -- Author: Michael Bianco <http://mabblog.com/> | |
| -- Some help from: http://discussions.info.apple.com/message.jspa?messageID=10363317 | |
| on create_vpn_service(vpn_name) | |
| tell application "System Preferences" | |
| reveal pane "Network" | |
| activate | |
| tell application "System Events" | |
| tell process "System Preferences" |
| #!/bin/bash | |
| # ssh-multi | |
| # D.Kovalov | |
| # Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html | |
| # a script to ssh multiple servers over multiple tmux panes | |
| starttmux() { | |
| if [ -z "$HOSTS" ]; then |
| { | |
| "inbounds": [ | |
| { | |
| "port": 8888, | |
| "protocol": "vmess", | |
| "settings": { | |
| "clients": [ | |
| { | |
| "id": "b4b24b02-08a8-4ad5-aff2-1bc10a15315b", | |
| "alterId": 8 |
| #!/usr/bin/env bash | |
| # vim: set filetype=ruby: | |
| # b - browse Chrome bookmarks with fzf | |
| [ $(uname) = Darwin ] || exit 1 | |
| which fzf > /dev/null 2>&1 || brew reinstall --HEAD fzf || exit 1 | |
| /usr/bin/ruby -x "$0" | | |
| fzf-tmux -u 30% --ansi --multi --no-hscroll --tiebreak=begin | | |
| awk 'BEGIN { FS = "\t" } { print $2 }' | |
| python | |
| # GDB dashboard - Modular visual interface for GDB in Python. | |
| # | |
| # https://github.com/cyrus-and/gdb-dashboard | |
| # License ---------------------------------------------------------------------- | |
| # Copyright (c) 2015-2020 Andrea Cardaci <[email protected]> | |
| # |
| #!/bin/bash | |
| # data: 2020-03-31 | |
| # author: muzi502 | |
| # for: Fuck GFW and download some raw file form github without proxy using jsDelivr CDN | |
| set -xue | |
| # GitHub rul: https://github.com/ohmyzsh/ohmyzsh/blob/master/tools/install.sh | |
| # jsDelivr url: https://cdn.jsdelivr.net/gh/ohmyzsh/ohmyzsh/tools/install.sh | |
| wget $(echo $1 | sed 's/raw.githubusercontent.com/cdn.jsdelivr.net\/gh/' \ |
| # 支持鼠标模式 | |
| set -g mouse off | |
| set-option -g history-limit 30000 | |
| # PREFIX-Q 显示编号的驻留时长,单位 ms | |
| set -g display-panes-time 10000 | |
| # 关掉某个窗口后,编号重排 | |
| set -g renumber-windows on |