Git Product home page Git Product logo

hammers's Introduction

Hammers

这是什么?

通过文本编程,管理所有在开发环境中用到的各种各样的工具的配置,以便与用户下载安装。 当前包含的工具配置有

  • git(ingore&config)
  • ssh(config)
  • zsh(rc & env)
  • emacs
  • brew
  • vim
  • gdb
  • ripgrep
  • tmux
  • brew
  • shell

前置依赖

  1. brew 包管理器(注意一定要保持格式)
   curl -sjklL https://raw.githubusercontent.com/Homebrew/install/master/install.sh \
	 | sed 's#BREW_REPO="https://github.com/Homebrew/brew"#BREW_REPO="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"#'\
	 |sed  '2i\
	  HOMEBREW_CORE_GIT_REMOTE=https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
   '|sh

如果你也在**,你也在墙内,请使用如下的命令将 brew 的源调整到国内

# brew 程序本身,Homebrew/Linuxbrew 相同
git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git

# 以下针对 mac OS 系统上的 Homebrew
git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
git -C "$(brew --repo homebrew/cask-fonts)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-fonts.git
git -C "$(brew --repo homebrew/cask-drivers)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-drivers.git

# 以下针对 Linux 系统上的 Linuxbrew
git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/linuxbrew-core.git
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles
brew update
  1. 安装常用软件
brew bundle install --global

如何使用

emacs --script "./hammers.el"

彩蛋

melpa 离线加载

如果你觉得每次启动 emacs 都需要检查跟新,emacs 启动非常慢,可以使用如下命令将 emacs 的所有包进行离线缓存。emacs 启动配置会自动检测是否有对应的文件,决定是否开启离线模式

rsync -ravz --progress rsync://elpa.emacs-china.org/elpa/ /path/to/offline
ln -s /path/to/offline ~/.emacs.d/offline

更新所有的 brew

brew bundle list --global --brews | xargs brew upgrade
brew bundle list --global --casks | xargs brew cask upgrade

hammers's People

Contributors

kopinions avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.