This file contains 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
#!/usr/bin/env ruby | |
require 'gosu' # gem install gosu --no-document | |
include Gosu | |
$dimension, $splits = 200, 20 | |
$size = $dimension.to_f / $splits.to_f | |
class Worm | |
attr_writer :dir | |
def initialize() reset end |
This file contains 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
autoload -U colors && colors | |
HOUR=`date +"%k"` | |
function _is_current_ () { | |
if [[ $1 =~ ([0-9]{1,2})h([[:space:]]-[[:space:]])?([0-9]{1,2})?h? ]]; then | |
start=$match[1]; | |
end=$match[3]; | |
if [ -z $end ]; then | |
if [[ $HOUR -eq $start ]]; then |
This file contains 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
# [altura, largura, comprimento, peso] | |
products = [ | |
[28.0, 44.0, 33.0, 4], | |
[29.0, 44.0, 33.0, 17], | |
[50.0, 100.0, 50.0, 10], | |
[106, 40 , 20, 4], | |
[70, 70, 70, 20], | |
[66.65, 66.65, 66.65, 6.6], | |
[10, 1, 1, 7.5] | |
] |
This file contains 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
klebervirgilio@gmail.com |
This file contains 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
data = [ | |
215211, | |
218166, | |
221817, | |
224000, | |
226665, | |
228260, | |
230059, | |
235005, | |
239554, |
This file contains 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 img(opt={}) | |
opt[:background_path] ||= "#{Rails.root.to_s}/public/images/citywaypass/card_background.png" | |
opt[:background_density] ||= "300x300" | |
opt[:font] ||= 'arial' | |
opt[:font_weight] ||= 900 | |
opt[:pointsize] ||= 24 | |
opt[:width] ||= 2603 | |
opt[:heigth] ||= 1620 | |
opt[:text] ||= "Something...." |
This file contains 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 parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
function proml { | |
local BLUE="\[\033[0;34m\]" | |
local RED="\[\033[0;31m\]" | |
local LIGHT_RED="\[\033[1;31m\]" | |
local GREEN="\[\033[0;32m\]" | |
local LIGHT_GREEN="\[\033[1;32m\]" |
This file contains 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 parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
function proml { | |
local BLUE="\[\033[0;34m\]" | |
local RED="\[\033[0;31m\]" | |
local LIGHT_RED="\[\033[1;31m\]" | |
local GREEN="\[\033[0;32m\]" | |
local LIGHT_GREEN="\[\033[1;32m\]" |
This file contains 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
attr = { | |
"1"=>"Passeio de jeep na Floresta da Tijuca", | |
"4"=>"Tirolesa na Lagoa Rodrigo de Freitas", | |
"5"=>"City Tour pela Cidade Maravilhosa", | |
"8"=>"Museu Casa do Pontal", | |
"9"=>"Forte de Copacabana", | |
"13"=>"Mosteiro de São Bento", | |
"16"=>"Museu de Arte Moderna", | |
"19"=>"Museu do Índio", | |
"24"=>"Planetário do Rio", |
This file contains 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
<script src="http://widgets.twimg.com/j/2/widget.js"></script> | |
<script> | |
new TWTR.Widget({ | |
version: 2, | |
type: 'profile', | |
rpp: 4, | |
interval: 2000, | |
width: 250, | |
height: 300, | |
theme: { |
OlderNewer