Skip to content

Instantly share code, notes, and snippets.

View hangox's full-sized avatar
🤒
Out sick

hangox

🤒
Out sick
View GitHub Profile
@hangox
hangox / privacy-policy.md
Created March 23, 2026 02:17
Privacy Policy for 大神CMS导航 Chrome Extension

Privacy Policy - 大神CMS导航 Chrome Extension

Last updated: 2026-03-23

Data Collection

This extension does not collect, store, or transmit any user data.

Permissions

@hangox
hangox / statusline.ts
Last active March 30, 2026 12:14
Claude Code 自定义状态栏脚本 - 显示项目/Git/模型/费用/配额信息
#!/usr/bin/env bun
/**
* Claude Code 状态行脚本
* 基于 robbyrussell 主题风格,使用 Bun TypeScript 重写
* 用法: bun /Users/hangox/.claude/statusline.ts
*/
import { execSync, spawnSync } from "child_process";
import { existsSync, readFileSync, writeFileSync, statSync } from "fs";
@hangox
hangox / sync_claude_projects.py
Last active October 12, 2025 17:05
同步所有 Claude Code 项目的脚本 - 自动读取并同步 ~/.claude/projects/ 中的所有项目
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
同步所有 Claude Code 项目的脚本
读取 ~/.claude/projects/ 目录中的所有项目,
并在每个项目目录中运行 specstory sync 命令
支持平台: macOS, Linux, Windows
"""
@hangox
hangox / init-docker-and-bbr
Created August 9, 2020 14:00
初始化主机
#!/usr/bin/env bash
curl -o- -L https://gist.githubusercontent.com/hangox/1b7c6b1e675cba36e654e5d9f546085d/raw/4e416c709187f914a919e6f6a9ba22fcd611cf74/enable-bbr.sh | bash
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update -y
sudo apt-get install -y\
apt-transport-https \
ca-certificates \
curl \
@hangox
hangox / ubunut-install-docker.sh
Last active April 11, 2023 08:17
ubuntu 安装docker
#!/usr/bin/env bash
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update -y
sudo apt-get install -y\
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
@hangox
hangox / license_accepter.sh
Created March 11, 2018 05:54
make adk license
#!/bin/bash
ANDROID_HOME=$1
check_android_home() {
if [ "$#" -lt 1 ]; then
if [ -z "${ANDROID_HOME}" ]; then
echo "Please either set ANDROID_HOME environment variable, or pass ANDROID_HOME directory as a parameter"
exit 1
else
ANDROID_HOME="${ANDROID_HOME}"
@hangox
hangox / enable-bbr.sh
Last active May 25, 2018 10:58
打开bbr
#!/usr/bin/env bash
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p
sysctl net.ipv4.tcp_available_congestion_control
sysctl net.ipv4.tcp_congestion_control
lsmod | grep bbr
@hangox
hangox / update-kernel-for-centos7.sh
Last active October 11, 2017 07:29
更换cento7 的内核
#!/usr/bin/env bash
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
yum --enablerepo=elrepo-kernel install kernel-ml -y
egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \'
grub2-set-default 0 # default 0 表示第一个内核设置为默认运行, 选择最新内核就对了
reboot
@hangox
hangox / install-docker-ce-for-centos7.sh
Last active October 17, 2017 05:54
安装docker-ce
#!/usr/bin/env bash
# 移除老旧docker
sudo yum remove docker \
docker-common \
docker-selinux \
docker-engine
sudo yum install -y yum-utils \
@hangox
hangox / Git打包
Last active May 25, 2018 02:59
Git打包命令
简单的用法就是
git archive --format zip --output /path/to/file.zip master # 将 master 以zip格式打包到指定文件
还有个更简单的
git archive v0.1 | gzip > site.tgz
git archive master > /home/hainuo/fds.zip