Contributing to Open Source
=======
First Rule: You can find the time
- It doesn’t take much
- Weekends are good
- Find what other time you’re wasting
- Try something that’s not your day job
Second Rule: What to contribute to?
| # -*- coding: utf8 -*- | |
| from django.test import TestCase | |
| # (...) | |
| def test_excluir_usuario(self): | |
| """O Usuario e excluido?""" | |
| id_usuario = 12 # Teste desse exemplo |
| #!/bin/bash | |
| # Download do web2py no pypi e no site oficial | |
| if [-f web2py-1.96.4.tar.gz] | |
| then | |
| echo "Arquivo web2py vindo do Pypi já foi puxado." | |
| else | |
| wget http://pypi.python.org/packages/source/w/web2py/web2py-1.96.4.tar.gz#md5=c747ce40bf7becaeb4782b4c766eef94 | |
| fi |
| [Desktop Entry] | |
| Type=Application | |
| Version=1.0 | |
| Name=Wunderlist | |
| Name[vi]=Wunderlist | |
| GenericName=Task Manager | |
| GenericName[pt_BR]=Gerenciador de Tarefas | |
| Icon=/opt/Wunderlist-1.2.4/Resources/wunderlist.png | |
| TryExec=/opt/Wunderlist-1.2.4/Wunderlist | |
| Exec=/opt/Wunderlist-1.2.4/Wunderlist |
| # -*- coding: utf8 -*- | |
| """ | |
| Script baseado no snippet abaixo: | |
| http://djangosnippets.org/snippets/176/ | |
| Obs.: Alterei algumas coisas como: | |
| * Import newsform para forms; | |
| * Aceitar o formato 0,00, sendo que o formato 0.00 é aceitado por padrão. | |
| """ |
| # Virtualenvwrapper | |
| export WORKON_HOME=$HOME/Dropbox/Desenvolvimento/Projetos/ | |
| source /usr/local/bin/virtualenvwrapper.sh | |
| # export VIRTUALENVWRAPPER_PYTHON='/usr/bin/python2.7' |
| # /etc/fstab: static file system information. | |
| # | |
| # Use 'blkid' to print the universally unique identifier for a | |
| # device; this may be used with UUID= as a more robust way to name devices | |
| # that works even if disks are added and removed. See fstab(5). | |
| # | |
| # <file system> <mount point> <type> <options> <dump> <pass> | |
| proc /proc proc nodev,noexec,nosuid 0 0 | |
| # / was on /dev/sda7 during installation | |
| UUID=7f05f7b9-be65-4c5b-ae9e-b4efa304d44f / ext4 errors=remount-ro,user_xattr 0 1 |
Contributing to Open Source
=======
First Rule: You can find the time
- It doesn’t take much
- Weekends are good
- Find what other time you’re wasting
- Try something that’s not your day job
Second Rule: What to contribute to?
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| default_application = 'init' # ordinarily set in base routes.py | |
| default_controller = 'default' # ordinarily set in app-specific routes.py | |
| default_function = 'index' # ordinarily set in app-specific routes.py | |
| routers = dict( | |
| # base router |
| # coding: utf8 | |
| from django.db import models | |
| from django.contrib.auth.models import User, Permission | |
| class Operator(models.Model): | |
| user= models.ForeignKey(User,related_name='operator_user',blank=True,null=True,editable=False) | |
| name = models.CharField(max_length=80) | |
| username = models.CharField(max_length=30,unique=True) | |
| password = models.CharField(max_length=30) |
| """ | |
| Tipo de campo que facilita a aplicação de campos de estado brasileiro. | |
| Fonte: http://www.marinhobrandao.com/blog/estadobrasileirofield_11/ | |
| """ | |
| import re | |
| from django.db import models | |
| from django import forms | |
| from django.core import validators |