Skip to content

Instantly share code, notes, and snippets.

View bloatfan's full-sized avatar
🤒
Out sick

bloatfan bloatfan

🤒
Out sick
View GitHub Profile
@bloatfan
bloatfan / optimize.sh
Last active February 24, 2024 12:38 — forked from taurusxin/optimize.sh
Linux Optimization Script
#!/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
@bloatfan
bloatfan / vagrant-vmware-tech-preview-apple-m1-pro.md
Created March 30, 2022 12:08 — forked from sbailliez/vagrant-vmware-tech-preview-apple-m1-pro.md
Vagrant and VMWare Tech Preview on Apple M1 Pro

Vagrant and VMWare Tech Preview on Apple M1 Pro

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

Installing Rosetta

First install Rosetta if not already done, this is needed to run x86 code:

@bloatfan
bloatfan / vpn-utilities.applescript
Created September 12, 2021 08:52 — forked from iloveitaly/vpn-utilities.applescript
Configure / create VPN connections via applescript
-- 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"
@bloatfan
bloatfan / ssh-multi.sh
Created October 26, 2020 05:41 — forked from dmytro/ssh-multi.sh
Start multiple synchronized SSH connections with Tmux
#!/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
@bloatfan
bloatfan / config.json
Created August 21, 2020 23:14
vmess 配置文件
{
"inbounds": [
{
"port": 8888,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "b4b24b02-08a8-4ad5-aff2-1bc10a15315b",
"alterId": 8
@bloatfan
bloatfan / b.rb
Created August 8, 2020 08:57 — forked from junegunn/b.rb
b - browse Chrome bookmarks with fzf
#!/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 }' |
@bloatfan
bloatfan / .gdbinit
Created April 13, 2020 15:30
.gdbinit
python
# GDB dashboard - Modular visual interface for GDB in Python.
#
# https://github.com/cyrus-and/gdb-dashboard
# License ----------------------------------------------------------------------
# Copyright (c) 2015-2020 Andrea Cardaci <cyrus.and@gmail.com>
#
#!/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/' \
@bloatfan
bloatfan / .tmux.conf
Last active June 20, 2020 10:52
.tmux.conf
# 支持鼠标模式
set -g mouse off
set-option -g history-limit 30000
# PREFIX-Q 显示编号的驻留时长,单位 ms
set -g display-panes-time 10000
# 关掉某个窗口后,编号重排
set -g renumber-windows on
@bloatfan
bloatfan / .vimrc
Last active May 11, 2020 09:25
.vimrc
set nocompatible " be iMproved, required
filetype off " required
" git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
" mkdir -p ~/.vim/.backup/
" mkdir -p ~/.vim/.swp/
" mkdir -p ~/.vim/.undo/
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()