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
1.9.3p194 :022 > Money.new(1000, "USD").format(:with_currency => true) | |
=> "$10,00 USD" |
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
end_date = Date.today + 7.days | |
if request[:end] | |
end_date = Date.parse(request[:end]) | |
end |
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
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
BLUE="\[\033[0;34m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
WHITE="\[\033[1;37m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
COLOR_NONE="\[\e[0m\]" |
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
#!/bin/bash | |
# Save these contents to .git/hooks/pre-commit in your project | |
# folder, and give it executable permissions with | |
# "chmod u+x .git/hooks/pre-commit" | |
# Git will abort a commit if you have non ASCII characters in | |
# the commit, and output the non ASCII characters. | |
output=`git diff HEAD | grep ^+[^+] | tr -d "\000-\011\013-\177" | tr -d '\n'` | |
cnt=${#output} | |
if [ -n "$output" ]; then |
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
#!/bin/bash | |
# Save these contents to .git/hooks/pre-commit in your project | |
# folder, and give it executable permissions with | |
# "chmod u+x .git/hooks/pre-commit" | |
# Git will abort a commit if you have non ASCII characters in | |
# the commit, and output the non ASCII characters. | |
output=`git diff HEAD | tr -d "\000-\011\013-\177" | tr -d '\n'` | |
cnt=${#output} | |
if [ -n "$output" ]; then |
NewerOlder