Skip to content

Instantly share code, notes, and snippets.

if [ $UID -eq 0 ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%n %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} '
RPS1='$(vi_mode_prompt_info 2>/dev/null) ${return_code}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
@asok
asok / type_cast.rb
Created July 13, 2016 10:56
Re-use of ActiveRecord's coercion
Documas::Study.connection.type_map.fetch("boolean").type_cast_from_user("0")
@asok
asok / keybase.md
Created August 10, 2021 11:58
Claim on github account

Keybase proof

I hereby claim:

  • I am asok on github.
  • I am asok (https://keybase.io/asok) on keybase.
  • I have a public key ASAKM9V7cOg7F-Qgf9ipnguXsQ5ZyVYOS09a6cvmQAFJVAo

To claim this, I am signing this object: