This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.gemrc | |
--- | |
:benchmark: false | |
:verbose: true | |
:update_sources: true | |
:sources: | |
- http://rubygems.org/ | |
:backtrace: false | |
:bulk_threshold: 1000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)]/" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script> | |
<script> | |
function addClick(){ | |
$("span.clickeable").live("click", function(){ | |
alert("clicked"); | |
}) | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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%}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"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", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 | |
( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use of console.table() | |
var iKnow = [ | |
{ lenguage: "Ruby", level: 10 }, | |
{ lenguage: "Go", level: 5 }, | |
{ lenguage: ".Net", level: 8 }, | |
{ lenguage: "FoxPro", level: 10 } | |
]; | |
console.table(iKnow); |
OlderNewer