I hereby claim:
- I am sauron on github.
- I am pablo_barrios (https://keybase.io/pablo_barrios) on keybase.
- I have a public key whose fingerprint is 02A9 9521 52E9 3BC3 8CC8 5995 E577 87B8 4A3C C3CC
To claim this, I am signing this object:
function is_rvm() { | |
if [[ "$(rvm-prompt)" != "" ]]; then | |
echo "[%{$fg[red]%}$(rvm-prompt)%{$fg_bold[white]%}]" | |
fi | |
} | |
PROMPT='%{$fg_bold[cyan]%}%c %{$fg_bold[white]%}$(git_prompt_info)%{$fg_bold[white]%}$(is_rvm) %{$fg_bold[cyan]%}• %{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="[%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" |
[alias] | |
up = pull --rebase origin | |
br = branch | |
st = status | |
ci = commit | |
co = checkout | |
ql = log --abbrev-commit --pretty=oneline | |
qlr = log --reverse --abbrev-commit --pretty=oneline | |
pending = log --reverse --abbrev-commit --pretty=oneline master --cherry-pick master... | |
undo = reset --soft HEAD^ |
{ | |
"caret_style": "phase", | |
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme", | |
"default_line_ending": "unix", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"fallback_encoding": "UTF-8", | |
"file_exclude_patterns": | |
[ | |
"*.pyc", |
def fibo(n) | |
root5=Math.sqrt(5) | |
phi=0.5+(root5/2) | |
Integer(0.5+phi**n/root5) | |
end | |
puts fibo(ARGV.first.to_i) |
# config/routes.rb | |
#agregancdo una accion a un recurso/miembro en particular | |
resources :books do | |
member do | |
put :publish | |
end | |
end | |
# o | |
put "/books/:id/publish", to: "books#publish" |
#Simple tree that will look as an arrow :D | |
height = 20 | |
((1..height).to_a+[6]*height.div(5)).map do |i| | |
puts ('*'*i*2).center(80) | |
end | |
#Simple tree that look more like a doodle christmas tree | |
height = 20 | |
( |
unset RUBY_AUTO_VERSION | |
function chruby_auto() { | |
local dir="$PWD/" version | |
until [[ -z "$dir" ]]; do | |
dir="${dir%/*}" | |
if { read -r version <"$dir/.ruby-version"; } 2>/dev/null || [[ -n "$version" ]]; then | |
if [[ "$version" == "$RUBY_AUTO_VERSION" ]]; then return |
I hereby claim:
To claim this, I am signing this object:
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working tree clean" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
} |
{ | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Palenight.tmTheme", | |
"default_line_ending": "unix", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"fallback_encoding": "UTF-8", | |
"file_exclude_patterns": | |
[ | |
"*.pyc", | |
"*.pyo", |