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
numero = gets | |
fizzbuzz(10) | |
# 1 2 fizz 4 buzz fizz 7 8 fizz buzz 11 fizz 13 14 fizzbuzz | |
# imprimir todos os números até o número | |
# se for divisível por 3, imprime fizz | |
# se for divisível por 5, imprime buzz | |
# caso não, imprime o próprio número |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"os" | |
"regexp" | |
) |
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
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
type Client struct { | |
name string |
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
package str | |
func Reverse(input string) string { | |
return "" | |
} |
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
/* | |
* http://css-tricks.com/centering-percentage-widthheight-elements/ | |
*/ | |
.center { | |
position: absolute; | |
left: 50%; | |
top: 50%; | |
/* |
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
$background-image: none | |
$background-color: black | |
$box-color: #EEE | |
$box-border-rounded: true | |
$name-color: black | |
$name-size: 47px | |
$name-font: Raleway |
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
title: Blah blah | |
text: | |
<<: *pt-BR | |
pt-BR: &pt-BR | |
recent_projects: Projetos Recentes | |
recent_posts: Últimos artigos | |
en-US: &en-US |
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
export EDITOR='mvim -p' | |
function keepcoding { | |
git status --porcelain --ignore-submodules | awk '$1 != "D" { print $2}' | xargs $EDITOR | |
} |
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
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
rescue_from ActiveRecord::RecordNotFound, :with => :not_found | |
private | |
def not_found | |
respond_to do |format| | |
format.html { render file: "#{Rails.root}/public/404", status: 404, layout: false} | |
end | |
true |