Archives by date

You are browsing the site archives by date.

my favorite ps1

bash: export PS1=’\[\033[38m\]\u@\h\[\033[01;34m\] \w \[\033[31m\]$(__git_ps1 “(%s) “)\[\033[37m\]$\[\033[0m\] ‘ zsh: zstyle ‘:vcs_info:*’ enable git zstyle ‘:vcs_info:*’ formats ‘(%b) ‘ precmd() { vcs_info } setopt PROMPT_SUBST PROMPT=$’%F{white}%n@mbp %B%F{blue}%~ %b%B%F{red}${vcs_info_msg_0_}%b%f%F{white}$%f ‘

patching third_party DEPS for fast fixes

Sometimes you just need to: template(“patch_file”) { assert(defined(invoker.patch_path), “patch_path must be defined for $target_name”) assert(defined(invoker.source_file), “source_file must be defined for $target_name”) action(target_name) { forward_variables_from(invoker, [ “testonly”, “visibility”, ]) script = “patch.py” sources = [ invoker.patch_path, invoker.source_file, ] outputs = [ “$target_gen_dir/” + invoker.source_file ] args = rebase_path(sources, root_build_dir) + rebase_path(outputs, root_build_dir) } } patch_file(“patch_SomeFile_m”) { […]