A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
| #!/bin/zsh | |
| # Wrapper script to properly handle ANSI escape codes for Claude Code statusline | |
| # Calls the Go binary with JSON input and ensures ANSI codes are interpreted correctly | |
| # Execute the Go statusline binary with JSON input and use printf to interpret ANSI codes | |
| printf "%b" "$(cat | "$HOME/.claude/statusline-go")" |
| # | |
| # Lastest update: 2025 | |
| # | |
| #!/bin/bash | |
| set -euo pipefail | |
| # Detect architecture and brew path (for M1/M2 Macs) | |
| ARCH=$(uname -m) | |
| if [[ "$ARCH" == "arm64" ]]; then | |
| eval "$(/opt/homebrew/bin/brew shellenv)" |
| /* 001 */ public Object generate(Object[] references) { | |
| /* 002 */ return new GeneratedIteratorForCodegenStage2(references); | |
| /* 003 */ } | |
| /* 004 */ | |
| /* 005 */ final class GeneratedIteratorForCodegenStage2 extends org.apache.spark.sql.execution.BufferedRowIterator { | |
| /* 006 */ private Object[] references; | |
| /* 007 */ private scala.collection.Iterator[] inputs; | |
| /* 008 */ private org.apache.spark.sql.execution.joins.UnsafeHashedRelation bhj_relation; | |
| /* 009 */ private boolean locallimit_stopEarly; | |
| /* 010 */ private int locallimit_count; |
| Java 內建的 ( https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html ) | |
| // "\\p{Space}" A whitespace character | |
| // "\\p{Punct}" A punctuation character | |
| -------------Unicode Range-------------------- | |
| // "\u0080-\u00FF" Latin-1 Supplement https://www.compart.com/en/unicode/block/U+0080 | |
| // "\u2000-\u206F" GeneralPunctuation https://www.compart.com/en/unicode/block/U+2000 | |
| // "\u2190-\u21FF" Arrows https://www.compart.com/en/unicode/block/U+2190 | |
| // "\u2200-\u22FF" MathematicalOperators https://www.compart.com/en/unicode/block/U+2200 |
| 04887a724e22786456041ce632e067f21c253779330c4c5d2ffd7ea6ea4e42e6bae18d094f53ade476c371cd54d799302857674cb6b0d68a78d0ea2bb353ecc801;c-darwin |
| - name: Ubuntu - update | |
| apt: state=latest name='*' | |
| when: apt_update is defined | |
| - name: Ubuntu - Install htop | |
| apt: name=htop state=latest | |
| - name: Ubuntu - Install vim | |
| apt: name=vim state=latest |
| #!/usr/bin/python | |
| import fileinput | |
| import json | |
| if __name__ == "__main__": | |
| text = '' | |
| for line in fileinput.input(): | |
| text = text + ' ' + line.strip() | |
| jsonObj = json.loads(text) | |
| print json.dumps(jsonObj, sort_keys=False, indent=2) |
| # Referecne: http://linoxide.com/linux-shell-script/shell-script-check-linux-system-health/ | |
| #!/bin/bash | |
| EMAIL='' | |
| function sysstat { | |
| echo -e " | |
| ##################################################################### | |
| Health Check Report (CPU,Process,Disk Usage, Memory) | |
| ##################################################################### | |
| #!/bin/bash | |
| # mac_setup.sh | |
| # Author: Howie | |
| # Description: Robust end-to-end macOS dev environment bootstrapper. | |
| # Shell safety first | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| ############################################################################### | |
| # Utility helpers # |