Skip to content

Instantly share code, notes, and snippets.

Ezequiel Bertti ebertti

Block or report user

Report or block ebertti

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# antes de executar este código, tente adivinhar a ordem dos prints em cada cenário
def gerador(qtd):
print('10 antes')
for i in range(qtd):
print('20 para cada', i)
yield i * 10
def normal(qtd):
print('10 antes')
ebertti /
Last active Dec 30, 2016
Smart label using, django-choices, django-suit (bootstrap2) and django-admin-easy
class Kind(DjangoChoices):
Default = C(value='default')
Success = C(value='success')
Warning = C(value='warning')
Important = C(value='important')
Info = C(value='info')
Inverse = C(value='inverse')
class CK(ChoiceItem):
ebertti /
Last active Sep 2, 2016
oh-my-zsh with custom theme and plugins
# to run replate _URL_ for the url on RAW button
# sh -c "$(curl -fsSL _URL_)"
sh -c "$(curl -fsSL"
sed -i -- 's/robbyrussell/juanghurtado/g' ~/.zshrc
sed -i -- 's/(git)/(git python pyenv pip)/g' ~/.zshrc
ebertti /
Created Aug 5, 2016
Dreamhost with passenger+python forcing HTTPS redirect 301 on file
import sys, os
os.environ['DJANGO_SETTINGS_MODULE'] = "my_project_name.settings"
### OLD DJANGO like 1.3
import django.core.handlers.wsgi
wsgi_application = django.core.handlers.wsgi.WSGIHandler()
### new django versions
from django.core.wsgi import get_wsgi_application
ebertti /
Last active Aug 29, 2015
Como fazer o PopcornTime voltar a funcionar com ChromeCast

Eu estava tendo esse problemas e achei uma solução, para quem quiser corrigir, segue a solução.

Path do arquivo para correção no Windows:

%LOCALAPPDATA%\Popcorn Time\node_modules\chromecast-js\pt-media-receiver.js

Alterar a linha 7 DE:

    PopcornStyledMediaReceiver.APP_ID = '887D0748';
ebertti /
Last active Aug 29, 2015
# coding: utf-8
import csv
import sys
import re
def main():
regra = re.compile(r'*')
selecionados = set()
ebertti / abstract.js
Last active Aug 29, 2015
Mira - Europeana
View abstract.js
var abstract = [{
name: 'topic',
widgets : [
{name: 'header', children:[
{name: 'logo'},
{name: 'search_form', children:[
{name: 'search_group', children:[
{name: 'search_field'},
View xml_fixed.xml
<!-- just a sample of xml FIXED -->
<code type="null"/>
<products type="list">
<product> <!-- my fix is here -->
<price type="null"/>
<model>Core 2 Duo</model>
<disponibilidade type="boolean">False</disponibilidade>
</product> <!-- my fix is here -->
You can’t perform that action at this time.