Skip to content

Instantly share code, notes, and snippets.

@mabeple
mabeple / linux.sh
Last active November 30, 2025 08:43
linux
#!/bin/bash
set -e
# =========================
# 检查 sudo
# =========================
check_sudo() {
if ! command -v sudo >/dev/null 2>&1; then
echo "⚠️ 未检测到 sudo"
read -p "是否现在安装 sudo? (Y/n): " INSTALL_SUDO
@mabeple
mabeple / swift
Created February 16, 2022 10:21
FakeBar
//
// FakeBar.swift
// Demo
//
// Created by cy on 2022/2/11.
//
import UIKit
class FakeBar: UIView {
@mabeple
mabeple / git 设置和取消代理
Last active February 16, 2022 03:19
git 设置和取消代理
git config --global http.proxy http://127.0.0.1:6152
git config --global https.proxy https://127.0.0.1:6152
git config --global --unset http.proxy
git config --global --unset https.proxy
// Default Branch Name
git config --global init.defaultBranch main