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
require 'bundler' | |
Bundler.setup | |
Bundler.require | |
require 'rack/contrib/try_static' | |
use Rack::TryStatic, | |
:root => "public", # static files root dir | |
:urls => %w[/], # match all requests | |
:try => ['.html', 'index.html', '/index.html'] | |
run lambda { [404, {'Content-Type' => 'text/html'}, ['Not Found']]} |
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
[ui] | |
username=Lucas Sampaio <...> | |
merge=internal:merge | |
[extensions] | |
hgext.extdiff = | |
hgshelve=~/projects/hgshelve/hgshelve.py | |
[extdiff] | |
cmd.meld = |
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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"font_face": "Source Code Pro", | |
"font_size": 12, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"line_padding_bottom": 1, | |
"line_padding_top": 1, | |
"rulers": |
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
class Dog | |
def set_name( aName ) | |
@myname = aName | |
end | |
def get_name | |
return @myname | |
end | |
def talk |
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
class Dog | |
def initialize(name) | |
@myname = name | |
end | |
def set_name( aName ) | |
@myname = aName | |
end | |
def get_name |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
from random import random, shuffle | |
TOTAL_NUMBERS = 1000000 | |
def gera_txt(n=TOTAL_NUMBERS): |
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
# Dado um usuário logado | |
user = UserProfileFactory() | |
# Quando eu acesso a página inicial | |
response = self.app.get(reverse('home'), user=user) | |
# Então eu vejo a lista dos ambientes ativos | |
self.assertContains(response, 'Meus Ambientes') |
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 is_equal(a, b): | |
result = 0 | |
for x, y in zip(a, b): | |
result |= ord(x) ^ ord(y) | |
return result == 0 |
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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"font_face": "Source Code Pro", | |
"font_size": 12, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ | |
"Vintage" |
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(window, $, undefined) { | |
'use strict'; | |
// code goes here | |
})(window, jQuery); |